Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

model_list_contrasts

List contrasts used by a model


Description

List contrasts used by a model

Usage

model_list_contrasts(model)

## Default S3 method:
model_list_contrasts(model)

Arguments

model

a model object

Details

For models with no intercept, no contrasts will be applied to one of the categorical variable. In such case, one dummy term will be returned for each level of the categorical variable.

Value

A tibble with three columns:

  • variable: variable name

  • contrasts: contrasts used

  • contrasts_type: type of contrasts ("treatment", "sum", "poly", "helmert", "other" or "no.contrast")

  • reference: for variables with treatment, SAS or sum contrasts, position of the reference level

See Also

Examples

glm(
  am ~ mpg + factor(cyl),
  data = mtcars,
  family = binomial,
  contrasts = list(`factor(cyl)` = contr.sum)
) %>%
  model_list_contrasts()

broom.helpers

Helpers for Model Coefficients Tibbles

v1.3.0
GPL-3
Authors
Joseph Larmarange [aut, cre] (<https://orcid.org/0000-0001-7097-700X>), Daniel D. Sjoberg [aut] (<https://orcid.org/0000-0003-0862-2018>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.