decomping: decomping

View source: R/charting.R

decompingR Documentation

decomping

Description

Variable decomposition of linear regression

Usage

decomping(
  model = NULL,
  de_normalise = TRUE,
  categories = NULL,
  tail_window = NULL,
  verbose = FALSE
)

Arguments

model

Model object

de_normalise

A boolean to specify whether to apply the normalisation

categories

data.frame mapping variables to groups

tail_window

for time series, length of tail

verbose

A boolean to specify whether to print warnings

Details

Calculates the decomposition of the independent variables based on an input model object. This can be expanded by leveraging id variables (e.g. date) and categories (i.e. groups of variables).

Value

a list of 3 data.frame's representing the variable and category decomposition, and the fitted values.

Examples

run_model(data = mtcars,dv = 'mpg',ivs = c('wt','cyl','disp'),decompose=FALSE) %>% decomping()

linea documentation built on Sept. 15, 2022, 9:06 a.m.