David Widmann

Results 1463 comments of David Widmann

The problem is that the sampler returns values of 0, which are not in the support of the Gamma distribution. In the case of the Beta distribution, for the parameter...

According to some quick debugging, the problem seems to be https://github.com/JuliaStats/Distributions.jl/blob/a2304a8811f42a7203c76950ddf5f3a5bceb4533/src/samplers/gamma.jl#L210 Here `x` is sampled from `Gamma(a + 1, theta)`, `s.nia = -1 / a`, and `e = randexp()`. For...

Hmm I see the problem but I still think that a sampler should only return valid samples (or throw an error), but not yield samples that are not in the...

In addition, depending on the use case, one could sample real-valued `X` with `exp(X) ~ Gamma(0.01, 1)` directly, i.e., without sampling from `Gamma(0.01, 1)` (by, e.g., sampling `log(x) + s.nia...

The algorithm in https://arxiv.org/pdf/1302.1884.pdf seems to be an efficient method for sampling `X` with `exp(X) ~ Gamma(a, 1)` for small shape parameter `a` directly, without sampling `exp(X)` first. Hence `X`...

This would correspond to a truncated Beta distribution. As mentioned e.g. in https://github.com/JuliaStats/Distributions.jl/issues/1003#issuecomment-555992757, the mass between 0 and `floatmin(Float64)` can be non-negligible.

Maybe we should just support sampling of `inv-logistic(X)` as discussed in https://github.com/JuliaStats/Distributions.jl/issues/1003#issuecomment-556978582 and point users to it for the problematic parameter choices.

> 2\. `SpecialFunctions`' `beta_inc` and `gamma_inc` which need `DiffRules` definitions. The current design of DiffRules does not support defining rules for `beta_inc` and `gamma_inc` since they return tuples. Support for...

Some of them at least are due to tests that have to be fixed/removed: https://github.com/JuliaStats/Distributions.jl/actions/runs/5017513840/jobs/8995725428?pr=1723#step:6:67 Some others seem to indicate that `logtp = -Inf` currently for normal distributions truncated far...

I opened #1728 to address the `logdiffcdf` issue for normal distributions.