Get contrasts used in the model

model_get_contrasts(model)

# S3 method for model_fit
model_get_contrasts(model)

# S3 method for zeroinfl
model_get_contrasts(model)

# S3 method for hurdle
model_get_contrasts(model)

# S3 method for betareg
model_get_contrasts(model)

Arguments

model

a model object

Examples

glm(
  am ~ mpg + factor(cyl),
  data = mtcars,
  family = binomial,
  contrasts = list(`factor(cyl)` = contr.sum)
) %>%
  model_get_contrasts()
#> $`factor(cyl)`
#>   [,1] [,2]
#> 4    1    0
#> 6    0    1
#> 8   -1   -1
#>