cm {actuar} | R Documentation |
Fit a credibility model in the formulation of variance components as described in Dannenburg, Kaas and Goovaerts (1996). Models supported are part of a generalized hierarchical credibility theory as introduced in Dannenburg (1995).
cm(formula, data, ratios, weights, subset, TOL = 1E-6, echo = FALSE) ## S3 method for class 'cm': print(x, ...) ## S3 method for class 'cm': predict(object, levels = NULL, ...) ## S3 method for class 'cm': summary(object, levels = NULL, ...) ## S3 method for class 'summary.cm': print(x, ...)
formula |
a symbolic description of the model to be fit. The details of model specification are given below. |
data |
a matrix or a data frame containing the portfolio structure, the ratios or claim amounts and their associated weights, if any. |
ratios |
expression indicating the columns of data
containing the ratios or claim amounts. |
weights |
expression indicating the columns of data
containing the weights associated with ratios . |
subset |
an optional logical expression indicating a subset of observations to be used in the modeling process. All observations are included by default. |
TOL |
maximum absolute error in the iterative calculation of the variance estimators. |
echo |
logical; whether to echo the iterative procedure or not |
x, object |
an object of class "cm" |
levels |
character vector indicating the levels to predict or to
include in the summary; if NULL all levels are included. |
... |
additional attributes to attach to the result for the
predict and summary methods; further arguments to
format for the print.summary method;
unused for the print method. |
The formula
argument symbolically describes the structure of
the portfolio in the form ~ terms. Each term is an interaction
between risk factors contributing to the total variance of the
portfolio data. At the moment, cm
can only handle hierarchical
interactions, with any given number of levels. The Bühlmann-Straub
model is a special case with only one level.
Terms are separated by +
operators and interactions within each
term by :
. For a portfolio divided first into sectors, then
units and finally contracts, formula
would be ~ sector +
sector:unit + sector:unit:contract, where sector
, unit
and contract
are column names in data
. In general, the
formula should be of the form ~ a + a:b + a:b:c + a:b:c:d +
....
Arguments ratios
, weights
and subset
are used
like arguments select
, select
and subset
of
function subset
.
Data does not have to be sorted by level. Nodes with no data (complete
lines of NA
except for the portfolio structure) are allowed.
The credibility premium at one level is a convex combination between the linearly sufficient statistic of a node and the credibility premium of the level above. (For the first level, the complement of the credibility is given to the collective premium.) The linearly sufficient statistic one node is the credibility weighted average of the data of the node, except at the last level, where natural weights are used. The credibility factor of node i is equal to
w[i]/(w[i] + B/W),
where w[i] is the weight of the node used in the linearly sufficient statistic, B is the average between node variance and W is the average within node variance.
Estimators of the variance structure parameters are pseudo-estimators of the form
sum(i; w[i] * (X[i] - Xb)^2)/d,
where X[i] is the linearly sufficient statistic of one level, Xb is the linearly sufficient statistic of the level above and d is the effective number of nodes at one level minus the effective number of nodes of the level above.
Function cm
computes the structure parameters estimators of the
model specified in formula
. The value returned is an object of
class cm
.
An object of class "cm"
is a list with the following
components:
means |
a list containing, for each level, the vector of linearly sufficient statistics. |
weights |
a list containing, for each level, the vector of total weights. |
variances |
a vector containing the variance structure parameters estimators. |
cred |
a list containining, for each level, the vector of credibility factors. |
levels |
the columns of data containing the portfolio
structure. |
nodes |
a list containing, for each level, the vector of the number of nodes in the level. |
ordering |
a list containing, for each level, the affiliation of a node to the node of the level above. |
call |
the function call. |
The method of predict
for objects of class "cm"
computes
the credibility premiums for the nodes of every level included in
argument levels
(all by default). Result is always a list the
same length as levels
or the number of levels in
formula
.
Vincent Goulet vincent.goulet@act.ulaval.ca, and Louis-Philippe Pouliot
Goulet, V. (1998), Principles and Application of Credibility Theory, Journal of Actuarial Practice, Volume 6, ISSN 1064-6647.
Goovaerts, M. J. and Hoogstad, W. J. (1987), Credibility Theory, Surveys of Actuarial Studies, NO.4, Nationale-Nederlanden N.V.
bstraub
for faster calculations of simple Bühlmann or
Bühlmann-Straub models; subset
,
formula
.
data(hachemeister) ## Simple Bühlmann-Straub model cm(~state, hachemeister, ratios = ratio.1:ratio.12, weights = weight.1:weight.12) bstraub(hachemeister[, 2:13], hachemeister[, 14:25]) # same, faster ## Two-level hierarchical model. Notice that data does not have ## to be sorted by level X <- cbind(unit = c(1, 2, 1, 2, 2), hachemeister) fit <- cm(~unit + unit:state, X, ratio.1:ratio.12, weight.1:weight.12) fit # print method summary(fit) # more details predict(fit) # credibility premiums