Hierarchical credibility model of Jewell
hierCredibility.Rd
Fit a random effects model, without contract-specific risk factors, using the hierarchical credibility model of Jewell.
Usage
hierCredibility(
Yijkt,
wijkt,
sector,
group,
data,
muHat = NULL,
type = c("additive", "multiplicative"),
returnData = FALSE
)
Arguments
- Yijkt
variable name of the response variable (the loss cost within actuarial applications).
- wijkt
variable name of the exposure weight.
- sector
variable name of the first hierarchical level.
- group
variable name of the second hierarchical level that is nested within the first hierarchical level.
- data
an object that is coercible by
as.data.table
, containing the variables in the model.- muHat
estimate for the intercept term. Default is
NULL
and in this case, the estimator as given in Ohlsson (2005) is used.- type
specifies whether the additive (Dannenburg, 1996) or multiplicative (Ohlsson, 2005) formulation of the hierarchical credibility model is used. Default is additive.
- returnData
Logical, indicates whether the data object has to be returned. Default is
FALSE
.
Value
An object of type hierCredibility
with the following slots:
- call
the matched call
- type
Whether additive or multiplicative hierarchical credibility model is used.
- Variances
The estimated variance components.
s2
is the estimated variance of the individual contracts,tausq
the estimate of \(Var(V[j])\) andnusq
is the estimate of \(Var(V[jk])\).- Means
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 \%.\%]\)).
- Weights
The weights at the first hierarchical level \(z[j\%.\%]\) and at the second hierarchical level \(w[\%.\%jk\%.\%]\).
- Credibility
The credibility weights at the first hierarchical level \(q[j\%.\%]\) and at the second hierarchical level \(z[jk]\).
- Premiums
The overall expectation \(widehat(\mu)\), sector expectation \(widehat(V)[j]\) and group expectation \(widehat(V)[jk]\).
- Relativity
The estimated random effects \(widehat(U)[j]\) and \(widehat(U)[jk]\) of the sector and group, respectively.
- RawResults
Objects of type
data.table
with all intermediate results.- fitted.values
the fitted mean values, resulting from the model fit.
References
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.http://www.actuaries.org/ASTIN/Colloquia/Zurich/Ohlsson.pdf
Examples
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:
#>
#> cohort zj Yjz_BarTilde qj Vj Uj
#> 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:
#>
#> cohort state wjk Yjk_BarTilde zjk Vjk Ujk
#> 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