Learn R Programming

IBLM (version 1.0.2)

data_beta_coeff_glm: Obtain GLM Beta Coefficients for tabular data

Description

Creates dataframe of GLM beta coefficients for each row and predictor variable of `data`

Usage

data_beta_coeff_glm(data, iblm_model)

Value

A data frame with beta coefficients. The structure will be the same dimension as `data` except for a "bias" column at the start.

Arguments

data

Data frame with predictor variables

iblm_model

Object of class 'iblm'

Examples

Run this code
df_list <- freMTPLmini |> split_into_train_validate_test(seed = 9000)

iblm_model <- train_iblm_xgb(
  df_list,
  response_var = "ClaimRate",
  family = "poisson"
)

data_glm <- data_beta_coeff_glm(df_list$train, iblm_model)

data_glm |> dplyr::glimpse()

Run the code above in your browser using DataLab