# This function is created inside explain_iblm() and is output as an item
df_list <- freMTPLmini |> split_into_train_validate_test(seed = 9000)
iblm_model <- train_iblm_xgb(
df_list,
response_var = "ClaimRate",
family = "poisson"
)
explain_objects <- explain_iblm(iblm_model, df_list$test)
# plot can be for a single categorical level OR a categorical variable
explain_objects$beta_corrected_density(varname = "AreaB")
# output can be numerical variable
explain_objects$beta_corrected_density(varname = "DrivAge")
# This function must be created, and cannot be called directly from the package
try(
beta_corrected_density(varname = "DrivAge")
)
Run the code above in your browser using DataLab