summarize_models: Concise model comparison summary table

View source: R/modeling.R

summarize_modelsR Documentation

Concise model comparison summary table

Description

Concise model comparison summary table

Usage

summarize_models(
  x,
  asterisks = c(0.01, 0.005, 0.001),
  asterisks_only = T,
  beta_digits = 2,
  beta_se_digits = beta_digits + 1,
  p_digits = 3,
  collapse_nonlinear = T,
  nonlinear_text = "(nonlinear)",
  collapse_factors = F,
  add_ref_level = T,
  ref_class_text = "(ref)"
)

Arguments

x

List of models

asterisks

Thresholds for asterisks

asterisks_only

Asterisks only? If false, then print rounded p values as well

beta_digits

Digits for betas

beta_se_digits

Digits for beta SEs

p_digits

Digits for p values

collapse_nonlinear

Hide uninterpretable betas for nonlinear terms

nonlinear_text

If collapse_nonlinear, then what text to use

collapse_factors

Whether to collapse factors or not. Can be a logical, or a string of factor names to collapse.

add_ref_level

Whether to add reference levels for factors

ref_class_text

In case of adding reference levels, which text to fill in

Value

Data frame

Examples

#default lm fits
models = list(
lm(Sepal.Width ~ Sepal.Length, data = iris),
lm(Sepal.Width ~ Sepal.Length + Petal.Width, data = iris),
lm(Sepal.Width ~ Sepal.Length + Petal.Width + Petal.Length, data = iris)
)
summarize_models(models)
summarize_models(models, asterisks = c(.05))
summarize_models(models, asterisks_only = F)

Deleetdk/kirkegaard documentation built on April 27, 2024, 3:26 p.m.