hierCredibility {actuaRE} | R Documentation |

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

`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 |

`muHat` |
estimate for the intercept term. Default is |

`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 |

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

`Means` |
The estimated averages at the portfolio level (intercept term |

`Weights` |
The weights at the first hierarchical level |

`Credibility` |
The credibility weights at the first hierarchical level |

`Premiums` |
The overall expectation |

`Relativity` |
The estimated random effects |

`RawResults` |
Objects of type |

`fitted.values` |
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*.http://www.actuaries.org/ASTIN/Colloquia/Zurich/Ohlsson.pdf

`hierCredibility-class`

, `fitted.hierCredibility`

, `predict.hierCredibility`

, `ranef-actuaRE`

,
`weights-actuaRE`

, `hierCredTweedie`

, `hierCredGLM`

, `cpglm`

, `plotRE`

```
library(actuar)
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)
summary(fitActuaRE)
```

[Package *actuaRE* version 0.1.5 Index]