clean_coefficients: clean_coefficients

View source: R/clean_coefficients.R

clean_coefficientsR Documentation

clean_coefficients

Description

Processing to split out base levels and add variable importance to each term. Inspired by 'tidycat::tidy_categorical()', modified for use in prettyglm..

Usage

clean_coefficients(
  d = NULL,
  m = NULL,
  vimethod = "model",
  spline_seperator = NULL,
  ...
)

Arguments

d

Data frame tibble output from tidy.lm; with one row for each term in the regression, including column 'term'

m

Model object glm

vimethod

Variable importance method. Still in development

spline_seperator

Sting of the spline separator. For example AGE_0_25 would be "_"

...

Any additional parameters to be past to vi

Value

Expanded tibble from the version passed to 'd' including additional columns:

variable

The name of the variable that the regression term belongs to.

level

The level of the categorical variable that the regression term belongs to. Will be an the term name for numeric variables.

Author(s)

Jared Fowler, Guy J. Abel

See Also

tidy.lm


prettyglm documentation built on Sept. 8, 2023, 5:56 p.m.