Learn R Programming

actuar (version 0.9-3)

cm: Hierarchical Credibility Models

Description

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).

Usage

cm(formula, data, ratios, weights, subset, TOL = 1E-6, echo = FALSE)

## S3 method for class 'cm': print(x, \dots)

## S3 method for class 'cm': predict(object, levels = NULL, \dots)

## S3 method for class 'cm': summary(object, levels = NULL, \dots)

## S3 method for class 'summary.cm': print(x, \dots)

Arguments

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

Value

  • 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:

  • meansa list containing, for each level, the vector of linearly sufficient statistics.
  • weightsa list containing, for each level, the vector of total weights.
  • variancesa vector containing the variance structure parameters estimators.
  • creda list containining, for each level, the vector of credibility factors.
  • levelsthe columns of data containing the portfolio structure.
  • nodesa list containing, for each level, the vector of the number of nodes in the level.
  • orderinga list containing, for each level, the affiliation of a node to the node of the level above.
  • callthe 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.

Details

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 $$\frac{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 $$\frac{1}{d} \sum_i w_i (X_i - \bar{X})^2,$$ where $X_i$ is the linearly sufficient statistic of one level, $\bar{X}$ 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.

References

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.

See Also

bstraub for faster calculations of simple B�hlmann or B�hlmann-Straub models; subset, formula.

Examples

Run this code
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

Run the code above in your browser using DataLab