View source: R/model_rating_factors.R
rating_factors1 | R Documentation |
Extract coefficients in terms of the original levels of the coefficients rather than the coded variables.Use rating_factors() to compare the output obtained from two or more glm objects.
rating_factors1( model, model_data = NULL, exposure = NULL, colname = "estimate", exponentiate = TRUE, round_exposure = 0 )
model |
a single glm object produced by |
model_data |
data.frame used to create glm object, this should only be specified in case the exposure is desired in the output, default value is NULL |
exposure |
the name of the exposure column in |
colname |
the name of the output column, default value is "estimate" |
exponentiate |
logical indicating whether or not to exponentiate the coefficient estimates. Defaults to TRUE. |
round_exposure |
number of digits for exposure (default to 0) |
Martin Haringa
MTPL2a <- MTPL2 MTPL2a$area <- as.factor(MTPL2a$area) x <- glm(nclaims ~ area, offset = log(exposure), family = poisson(), data = MTPL2a) rating_factors1(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.