JuliaStats / GLM.jl

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

Canonical link for negative binomial distribution #476

Closed mousum-github closed 2 years ago

mousum-github commented 2 years ago

In many places, the GLM documentation says that the canonical link for the negative binomial is the negative binomial link. Even if we run a negative binomial regression without a link function like the following: gm19 = fit(GeneralizedLinearModel, @formula(Days ~ Eth + Sex + Age + Lrn), quine, NegativeBinomial(2.0)) The output says the same. StatsModels.TableRegressionModel{GeneralizedLinearModel{GLM.GlmResp{Vector{Float64}, NegativeBinomial{Float64}, **NegativeBinomialLink**}, GLM.DensePredChol{Float64, LinearAlgebra.Cholesky{Float64, Matrix{Float64}}}}, Matrix{Float64}} But in the list distributions with their canonical link, it is mentioned LogLink is the canonical link of negative binomial distribution. NegativeBinomial (LogLink) This may confuse the users.