Fit a random effects model using Ohlsson's methodology. In this function you explicitly specify the power parameter p.
See hierCredTweedie when you also want to estimate the p.
hierCredGLM(
formula,
data,
weights,
p = 1.5,
link.power = 0,
muHatGLM = TRUE,
epsilon = 1e-04,
maxiter = 500,
maxiterGLM = 500,
verbose = FALSE,
returnData = TRUE,
balanceProperty = TRUE,
y = TRUE,
...
)An object of type hierCredGLM with the following slots:
the matched call
results of the hierarchical credibility model.
the results from fitting the GLM part.
total number of iterations.
logical indicating whether the algorithm converged.
object that summarizes the unique levels of each of the contract-specific covariates.
the fitted mean values, resulting from the model fit.
the weights (exposure) initially supplied.
if requested, the response vector. Default is TRUE.
object of type formula that specifies which model should be fitted. Syntax is the same as for
lmer and glmer. For example, Yijkt ~ x1 + x2 + (1 | Industry / Branch).
an object that is coercible by as.data.table, containing the variables in the model.
variable name of the exposure weight.
the value for the power parameter of the Tweedie distribution, which is passed to tweedie. Default is 1.5.
index of power link function, which is passed to tweedie. link.power = 0 produces a log-link.
Defaults to the canonical link, which is 1 - p.
indicates which estimate has to be used in the algorithm for the intercept term. Default is TRUE,
which used the intercept as estimated by the GLM. If FALSE, the estimate of the hierarchical credibility model is used.
positive convergence tolerance \(\epsilon\); the iterations converge when 7 \(||\theta[k] - \theta[k - 1]||^2[[2]]/||\theta[k - 1]||^2[[2]] < \epsilon\). Here, \(\theta[k]\) is the parameter vector at the \(k^{th}\) iteration.
maximum number of iterations.
maximum number of iterations when fitting the GLM part. Passed to glm.
logical indicating if output should be produced during the algorithm.
logical indicating if input data has to be returned.
logical indicating if the balance property should be satisfied.
logical indicating whether the response vector should be returned as a component of the returned value.
arguments passed to glm
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
Ohlsson, E. (2008). Combining generalized linear models and credibility models in practice. Scandinavian Actuarial Journal 2008(4), 301–314.
hierCredGLM-class, fitted.hierCredGLM, predict.hierCredGLM, ranef-actuaRE,
weights-actuaRE, hierCredibility, hierCredTweedie, plotRE,
adjustIntercept, BalanceProperty
# \donttest{
data("dataCar")
fit = hierCredGLM(Y ~ area + (1 | VehicleType / VehicleBody), dataCar, weights = w,
p = 1.7)
fit
summary(fit)
ranef(fit)
fixef(fit)
# }
Run the code above in your browser using DataLab