Skip to content

Add Tweedie distribution#2045

Open
nalimilan wants to merge 1 commit intomasterfrom
nl/tweedie
Open

Add Tweedie distribution#2045
nalimilan wants to merge 1 commit intomasterfrom
nl/tweedie

Conversation

@nalimilan
Copy link
Member

@nalimilan nalimilan commented Mar 16, 2026

This distribution is tricky to implement as there is no closed form for most functions. PDF is computed based on wrightbessel (JuliaMath/SpecialFunctions.jl#512). CDF and quantile are computed numerically from PDF. Performance is similar to reference R package tweedie.

When 1 < p < 2 it is continuous but with a point mass at zero so it is not completely correct to consider it a ContinuousUnivariateDistribution. When p = 1 it is even discrete. However I wasn't sure that justifies adding a new type like SemiContinuousUnivariateDistribution.

This distribution is useful to allow estimating Tweedie models in GLM.

This distribution is tricky to implement as there
is no closed form for most functions. PDF is computed
based on `wrightbessel`. CDF and quantile
are computed numerically. Performance is similar to
reference R package tweedie.

When `1 < p < 2` it is continuous but with a point
mass at zero so it is not completely correct to
consider it a `ContinuousUnivariateDistribution`. When
`p = 1` it is even discrete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant