hierCredibility.Rd
Fit a random effects model, without contract-specific risk factors, using the hierarchical credibility model of Jewell.
hierCredibility(
Yijkt,
wijkt,
sector,
group,
data,
muHat = NULL,
type = c("additive", "multiplicative"),
returnData = FALSE
)
variable name of the response variable (the loss cost within actuarial applications).
variable name of the exposure weight.
variable name of the first hierarchical level.
variable name of the second hierarchical level that is nested within the first hierarchical level.
an object that is coercible by as.data.table
, containing the variables in the model.
estimate for the intercept term. Default is NULL
and in this case, the estimator as given in Ohlsson (2005) is used.
specifies whether the additive (Dannenburg, 1996) or multiplicative (Ohlsson, 2005) formulation of the hierarchical credibility model is used. Default is additive.
Logical, indicates whether the data object has to be returned. Default is FALSE
.
An object of type hierCredibility
with the following slots:
the matched call
Whether additive or multiplicative hierarchical credibility model is used.
The estimated variance components. s2
is the estimated variance of the individual contracts,
tausq
the estimate of \(Var(V[j])\) and nusq
is the estimate of \(Var(V[jk])\).
The estimated averages at the portfolio level (intercept term \(\mu\)), at the first hierarchical level (\(bar(Y)[\%.\% j \%.\% \%.\%]^z\)) and at the second hierarchical level (\(bar(Y)[\%.\% jk \%.\%]\)).
The weights at the first hierarchical level \(z[j\%.\%]\) and at the second hierarchical level \(w[\%.\%jk\%.\%]\).
The credibility weights at the first hierarchical level \(q[j\%.\%]\) and at the second hierarchical level \(z[jk]\).
The overall expectation \(widehat(\mu)\), sector expectation \(widehat(V)[j]\) and group expectation \(widehat(V)[jk]\).
The estimated random effects \(widehat(U)[j]\) and \(widehat(U)[jk]\) of the sector and group, respectively.
Objects of type data.table
with all intermediate results.
the fitted mean values, resulting from the model fit.
Campo, B.D.C. and Antonio, Katrien (2023). Insurance pricing with hierarchically structured data an illustration with a workers' compensation insurance portfolio. Scandinavian Actuarial Journal, doi: 10.1080/03461238.2022.2161413
Dannenburg, D. R., Kaas, R. and Goovaerts, M. J. (1996). Practical actuarial credibility models. Amsterdam: IAE (Institute of Actuarial Science and Econometrics of the University of Amsterdam).
Jewell, W. S. (1975). The use of collateral data in credibility theory: a hierarchical model. Laxenburg: IIASA.
Ohlsson, E. (2005). Simplified estimation of structure parameters in hierarchical credibility. Presented at the Zurich ASTIN Colloquium.
library(actuar)
#>
#> Attaching package: ‘actuar’
#> The following objects are masked from ‘package:statmod’:
#>
#> dinvgauss, pinvgauss, qinvgauss, rinvgauss
#> The following objects are masked from ‘package:stats’:
#>
#> sd, var
#> The following object is masked from ‘package:grDevices’:
#>
#> cm
library(actuaRE)
data("hachemeister", package = "actuar")
Df = as.data.frame(hachemeister)
X = as.data.frame(cbind(cohort = c(1, 2, 1, 2, 2), hachemeister))
Df = reshape(X, idvar = "state", varying = list(paste0("ratio.", 1:12),
paste0("weight.", 1:12)), direction = "long")
fitActuar = cm(~ cohort + cohort:state, data = X, ratios = ratio.1:ratio.12,
weights = weight.1:weight.12, method = "Ohlsson")
fitActuaRE = hierCredibility(ratio.1, weight.1, cohort, state, Df)
summary(fitActuar)
#> Call:
#> cm(formula = ~cohort + cohort:state, data = X, ratios = ratio.1:ratio.12,
#> weights = weight.1:weight.12, method = "Ohlsson")
#>
#> Structure Parameters Estimators
#>
#> Collective premium: 1745.055
#>
#> Between cohort variance: 88476.11
#> Within cohort/Between state variance: 11628.45
#> Within state variance: 139120026
#>
#> Detailed premiums
#>
#> Level: cohort
#> cohort Indiv. mean Weight Cred. factor Cred. premium
#> 1 1965.436 1.427755 0.9157058 1946.859
#> 2 1527.011 1.633248 0.9255216 1543.250
#>
#> Level: state
#> cohort state Indiv. mean Weight Cred. factor Cred. premium
#> 1 1 2060.921 100155 0.8932938 2048.750
#> 2 2 1511.224 19895 0.6244749 1523.251
#> 1 3 1805.843 13735 0.5344614 1871.491
#> 2 4 1352.976 4152 0.2576359 1494.229
#> 2 5 1599.829 36110 0.7511373 1585.748
#>
summary(fitActuaRE)
#> Call:
#> hierCredibility(Yijkt = ratio.1, wijkt = weight.1, sector = cohort,
#> group = state, data = Df)
#>
#>
#> Additive hierarchical credibility model
#>
#> Estimated variance parameters:
#> Individual contracts: 139120026
#> Var(V[jk]): 11628.45
#> Var(V[j]): 88476.11
#> Unique number of categories of cohort: 2
#> Unique number of categories of state: 5
#>
#> Estimates at the cohort level:
#>
#> Key: <cohort>
#> cohort zj Yjz_BarTilde qj Vj Uj
#> <num> <num> <num> <num> <num> <num>
#> 1: 1 1.427755 1965.436 0.9157058 1946.859 201.8044
#> 2: 2 1.633248 1527.011 0.9255216 1543.250 -201.8044
#>
#> Estimates at the state level:
#>
#> Key: <cohort, state>
#> cohort state wjk Yjk_BarTilde zjk Vjk Ujk
#> <num> <num> <num> <num> <num> <num> <num>
#> 1: 1 1 100155 2060.921 0.8932938 2048.750 101.89107
#> 2: 1 3 13735 1805.843 0.5344614 1871.491 -75.36785
#> 3: 2 2 19895 1511.224 0.6244749 1523.251 -19.99963
#> 4: 2 4 4152 1352.976 0.2576359 1494.229 -49.02155
#> 5: 2 5 36110 1599.829 0.7511373 1585.748 42.49796