Douglas Bates

Results 227 comments of Douglas Bates

In conversion from `libRmath` how should invalid parameter values be handled? The `libRmath` code returns `NaN` in most of these cases. Julia code could do the same or could throw...

For example, I would write ```julia function poislogpdf(λ::T, x::T) where {T

@Nosferican I think of an assertion as stating a condition that must be true if the algorithm/code is functioning properly. Passing an out-of-bounds parameter value is, to me, pretty much...

@nalimilan Yes, of course. Thank you.

@Nosferican I disagree with throwing a `DomainError` for non-integer `x`. To me there is not a problem with returning `0` (or `T(-Inf)` for `poislogpdf`) for all `x` except the non-negative...

@Nosferican I see that you are correct about `DomainError` not taking an explanatory string. In that case I think it may be better to use `ArgumentErrror`. @nalimilan what do you...

@Ellipse0934 Keep in mind that the code in `src/distrs/*` is temporary. At least I believe this is the case - @simonbyrne or @andreasnoack or @ararslan are more authoritative voices on...

@andreasnoack I don't think you want to move everything in `StatsFuns` to `Distributions` until the dependencies on `Rmath` are removed. I thought the reason for having calls from `Distributions` to...

I checked and there are some packages that require `StatsFuns` but not either `Distributions` or "StatsBase`. ```julia julia> setdiff(Pkg.dependents("StatsFuns"), union(Pkg.dependents("Distributions"), Pkg.dependents("StatsBase"))) 6-element Array{AbstractString,1}: "RiemannTheta" "DynamicHMC" "Erdos" "Divergences" "HilbertSchmidtIndependenceCriterion" "LogProbs" ```

I agree that it is a good idea to move the functions related to distributions back into the `Distributions` package. I don't really recall why they were moved into `StatsFuns`...