Skip to contents

A normal prior on each log share ratio beta[d] = log(p[d] / p[1]) of bayes_bf_normalised(), with its own mean and standard deviation at each age after the first, in place of the model's N(0, development_sd^2) on every age (decision 29 of docs/design/reserving-bayes.md). The prior's ages must be the triangle's ages; industry_prior_at_age() cuts an industry prior to a younger triangle.

Usage

pattern_prior(ages, mean = NULL, sd, shares = NULL)

Arguments

ages

Development ages in months, increasing whole numbers.

mean

Means of the log share ratios after the first age, or NULL when shares is given.

sd

Standard deviations of the log share ratios after the first age.

shares

Incremental shares of the ultimate, one per age, or NULL when mean is given.

Value

A pattern_prior object.

Details

Give either mean (the means of beta[2], ..., beta[m]) or shares (one incremental share per age, from which the means are log(shares[d] / shares[1])); sd has one standard deviation per age after the first, each positive and finite.

Properties: ages, mean, sd, and shares and percent_developed (the pattern at the prior means).

This is Python's PatternPrior.

Examples

p <- pattern_prior(c(12, 24, 36), shares = c(0.5, 0.3, 0.2), sd = c(0.1, 0.2))
p@mean
#> [1] -0.5108256 -0.9162907
p@percent_developed
#> [1] 0.5 0.8 1.0