JuliaStats / StatsFuns.jl

Mathematical functions related to statistics.
Other
235 stars 40 forks source link

Argument names of `gammalogpdf` are inconsistent among methods #92

Closed vargonis closed 4 years ago

vargonis commented 4 years ago
help?> Distributions.gammalogpdf
  No documentation found.

  StatsFuns.RFunctions.gammalogpdf is a Function.

  # 2 methods for generic function "gammalogpdf":
  [1] gammalogpdf(α::Union{Float64, Int64}, β::Union{Float64, Int64}, x::Union{Float64, Int64}) in StatsFuns.RFunctions at /home/vargonis/.julia/packages/StatsFuns/dT2Je/src/rmath.jl:73
  [2] gammalogpdf(k::Real, θ::Real, x::Number) in StatsFuns at /home/vargonis/.julia/packages/StatsFuns/dT2Je/src/distrs/gamma.jl:19

The two methods do seem to be computing the same thing, though, so it is not a bug. It is the argument names of the first one that violate conventions, and that can induce to errors if one relies on the misleading information they convey.

nalimilan commented 4 years ago

After checking against R I confirm we are using the k, θ (a.k.a scale) parameterization. See https://github.com/JuliaStats/StatsFuns.jl/pull/93.