More claim counts
claim_count_dist.RdClaim counts beyond the Poisson, negative binomial and binomial, as in
aggregate's zm, zt, logarithmic, mixed, neymana and
dfreq:
Usage
claim_count_dist(ptr)
zero_modified_count(base, p0)
zero_truncated_count(base)
logarithmic_count(p)
mixed_poisson_count(
mean,
cv,
mixing = c("gamma", "inverse_gaussian", "beta", "sichel", "sichel_gamma", "sichel_ig"),
shift = 0,
max = NULL,
shape = NULL,
skewness = NULL,
f = NULL
)
gig_parameters(x)
compound_poisson_count(rate, secondary)
empirical_count(probs)
renewal_count(wait, horizon, step = NULL, points = NULL, closed = FALSE)
fixed_count(n)
bernoulli_count(p)
geometric_count(mean)Arguments
- ptr
Internal.
- base, secondary
A claim count.
- p0
P(N = 0), in[0, 1).- p
The logarithmic parameter, in
(0, 1), or the Bernoulli probability, in[0, 1).- mean, cv, shift
See above.
- mixing
"gamma","inverse_gaussian","beta","sichel","sichel_gamma"or"sichel_ig".- max
The beta mixing's largest Poisson mean, above
mean * (1 + cv^2).- shape, skewness
The Sichel shape, or the skewness that sets it.
- f
The fixed part matched by
"sichel_gamma"and"sichel_ig".- x
A claim count.
- rate
The Poisson rate of clusters.
- probs
Probabilities of
0, 1, ..., summing to 1.- wait
A distribution, or
list(values, probs).- horizon
The period, in the wait's units.
- step, points
The wait grid;
NULLforaggregate's.- closed
Whether waits summing to
horizoncount in full.- n
The fixed number of claims.
Value
A claim_count_dist, which inherits from distribution: use
it with pmf(), cdf(), mean(), variance(), quantile() and
draws().
Details
zero_modified_count():basewithP(N = 0) = p0;zero_truncated_count()isp0 = 0.logarithmic_count():P(N = k) = -p^k / (k log(1 - p))on1, 2, ....mixed_poisson_count(): Poisson with meanmean * theta, wheretheta = shift + (1 - shift) Ghas mean 1 and coefficient of variationcv, andGis gamma (negative binomial, or Delaporte with a shift) or inverse Gaussian (Poisson-inverse Gaussian, or its shifted version). Variancemean + mean^2 cv^2. With no shift, asaggregate's,Gmay also be"beta", the Poisson meanmaxtimes a beta variable (mixed beta cv max),"sichel", the generalized inverse Gaussian with the givenshape(mixed sichel cv shape;-0.5is the inverse Gaussian) or, withskewnessinstead, the shape that gives it, or"sichel_gamma"and"sichel_ig", the generalized inverse Gaussian with the skewness of the Delaporte's or the shifted inverse Gaussian's mixing with fixed partf(mixed sichel.gamma cv f,mixed sichel.ig cv f).gig_parameters()gives the generalized inverse Gaussian a Sichel mixing solved,c(shape, omega, eta)(aggregate'slam,mu / betaandmu), orNULL.compound_poisson_count(): a Poisson(rate) number of clusters ofsecondaryclaims (Poisson secondaries give the Neyman type A).empirical_count():P(N = k) = probs[k + 1].renewal_count(): the number of claims byhorizonwhen the waits between claims are independent draws fromwait(a renewal, or Sparre Andersen, count;aggregate'syears ... wait ...). Exponential waits give the Poisson. The wait is a distribution, orlist(values, probs)of waits and their probabilities, which may sum to less than 1 (the process then ends). Waits of zero arrive in clusters. The wait grid isaggregate's unlessstepandpointsare given;closedcounts waits summing to exactlyhorizonin full.fixed_count():N = n;bernoulli_count(): one claim with probabilitypin[0, 1);geometric_count():P(N = k) = q (1 - q)^kon0, 1, ...withq = 1 / (1 + mean), a negative binomial with shape 1 (aggregate'sfixed,bernoulliandgeometric).
Every aggregation function takes them. Zero-modified and logarithmic
counts work with Panjer's recursion; the others need method = "fft".
Examples
zt <- zero_truncated_count(poisson_count(2))
pmf(zt, 0:3)
#> [1] 0.0000000 0.3130353 0.3130353 0.2086902
pig <- mixed_poisson_count(10, 0.5, mixing = "inverse_gaussian")
variance(pig) # 10 + 100 * 0.25
#> [1] 35
compound_distribution(pig, grid_distribution(1, c(0.2, 0.5, 0.3)), 200, method = "fft")
#> <grid_distribution> step = 1, 200 points
pmf(renewal_count(gamma_distribution(2, 1), 5), 0) # the first wait beyond 5: 6 exp(-5)
#> [1] 0.04042768