The Bühlmann–Straub model, as actuar::cm(~group): group i in period
j has ratio X_ij (loss per unit of exposure) with weight w_ij.
Without weights it is Bühlmann's model. The between-group variance is
Bühlmann and Straub's unbiased estimator (actuar's
"Buhlmann-Gisler" and "Ohlsson") or Bichsel and Straub's iterative
one. The method, its estimators and its reference are documented once,
in the Rust reference.
Usage
buhlmann_straub(
ratios,
weights = NULL,
estimator = c("unbiased", "iterative"),
tol = sqrt(.Machine$double.eps),
max_iter = 100
)
Arguments
- ratios
A matrix, one row per group and one column per period;
NA for a missing cell.
- weights
A matrix of the same shape with NA in the same places,
or NULL for equal weights.
- estimator
"unbiased" or "iterative".
- tol, max_iter
Tolerance and iteration limit of the iterative
estimator.
Value
A list: collective_mean, between_variance,
within_variance, k (s2 / a), and per group group_means,
group_weights, credibility and premiums, with iterations.
Examples
x <- rbind(c(1, 2, 3), c(4, 5, 9))
fit <- buhlmann_straub(x)
fit$premiums
#> [1] 2.333333 5.666667