model_betas: Inspect insuRglm model coefficients

View source: R/model_betas.R

model_betasR Documentation

Inspect insuRglm model coefficients

Description

Inspect insuRglm model coefficients

Usage

model_betas(setup, triangles = FALSE)

Arguments

setup

Setup object. Created at the start of the workflow. Usually piped in from previous step.

triangles

Boolean scalar. Show beta coefficient differences instead. These are expressed using standard error percentage.

Value

Either dataframe containing model coefficients or matrix-like dataframe containing beta coefficient differences

Examples

require(dplyr) # for the pipe operator
data('sev_train')

setup <- setup(
  data_train = sev_train,
  target = 'sev',
  weight = 'numclaims',
  family = 'gamma',
  keep_cols = c('pol_nbr', 'exposure', 'premium')
)

modeling <- setup %>%
  factor_add(pol_yr) %>%
  factor_add(agecat) %>%
  model_fit()

modeling %>%
  model_betas()

modeling %>%
  model_betas(triangles = TRUE)


realgabon/insuRglm documentation built on Jan. 2, 2023, 2:51 a.m.