Skip to contents

Mean mean, dispersion dispersion and power 1 < power < 2: variance dispersion * mean^power, a point mass exp(-lambda) at 0 and a continuous density above it. It is a Poisson number of gamma losses, the GLM family for pure premium; tweedie_from_poisson_gamma() builds it from those. Properties: d@mean_param, d@dispersion, d@power, d@lambda (expected number of losses) and d@severity (a gamma_distribution).

Usage

tweedie(mean, dispersion, power, ptr = NULL)

tweedie_from_poisson_gamma(lambda, shape, scale)

Arguments

mean

Mean; finite and positive.

dispersion

Finite and positive.

power

In (1, 2).

lambda

Expected number of losses; finite and positive.

shape, scale

Gamma shape and scale of each loss.

Value

A tweedie object, which inherits from distribution.

Details

Supports the same operations as pareto, plus log_density().

Examples

y <- tweedie(500, 40, 1.6)
cdf(y, 0) - exp(-y@lambda)
#> [1] 0
log_density(y, c(100, 500))
#> [1] -7.459161 -8.171073