JuliaStats / GLM.jl

Generalized linear models in Julia
Other
593 stars 114 forks source link

`canonicallink(NegativeBinomial())` doesn't give `LogLink`? #418

Closed Indigo2233 closed 3 years ago

Indigo2233 commented 3 years ago

https://github.com/JuliaStats/GLM.jl/blob/504e5186c87b9bc3c7af70a69d570d329703b52a/src/glmtools.jl#L285 defines NegativeBinomialLink(d.r). However, in the documentation, https://juliastats.org/GLM.jl/dev/manual/#Fitting-GLM-models-1, it mentioned that

Typical distributions for use with glm and their canonical link functions are

       Bernoulli (LogitLink)
        Binomial (LogitLink)
           Gamma (InverseLink)
 InverseGaussian (InverseSquareLink)
NegativeBinomial (LogLink)
         Normal (IdentityLink)
         Poisson (LogLink)

, which is quite confusing.