Hachemeister's regression credibility
hachemeister.RdHachemeister's regression model, as actuar::cm(~risk, regformula = formula, regdata = data): risk i in period t has ratio X_it with
weight w_it and a mean on a design shared by the risks (a trend line
~ time, say). Each risk's own weighted least squares fit is shrunk
towards the collective by a credibility matrix. estimator applies
only with adjust_intercept = TRUE, whose formula must have an
intercept as its first column; at the origin the between covariance is
always Hachemeister's iterative estimator, as in actuar.
Usage
hachemeister(
ratios,
weights = NULL,
formula = ~time,
data = data.frame(time = seq_len(ncol(ratios))),
estimator = c("unbiased", "iterative"),
adjust_intercept = FALSE,
tol = sqrt(.Machine$double.eps),
max_iter = 100
)
hachemeister_fit(
collective = numeric(0),
coefficients = NULL,
individual = NULL,
credibility = NULL,
between = NULL,
within_variance = numeric(0),
risk_weights = numeric(0),
transition = NULL,
iterations = numeric(0),
terms = NULL
)Arguments
- ratios
A matrix, one row per risk and one column per period;
NAfor a missing cell.- weights
A matrix of the same shape with
NAin the same places, orNULLfor equal weights.- formula
A one-sided formula for the design, evaluated in
data.- data
A data frame with one row per period; by default
time = 1, 2, ....- estimator
"unbiased"or"iterative".- adjust_intercept
Put the intercept at the barycentre of the periods.
- tol, max_iter
Tolerance and iteration limit of the iterations.
Value
A hachemeister_fit with properties collective (named by the
design's columns), coefficients and individual (one row per risk),
credibility (a p x p x risks array in the basis fitted), between,
within_variance, risk_weights, transition (R with the design
Y = Q R when adjusted, else NULL) and iterations; predict(fit, newdata) gives each risk's premium at each row of newdata.
Details
The method, its estimators and its reference are documented once, in the Rust reference.