decomp_log: Decomp and contribution calculation function for...

Description Usage Arguments Value

View source: R/decomp_log.R

Description

A function to calucate decomp and contribution for multiplicative model

Usage

1
2
decomp_log(input_data, input_var, y, y_m = NULL, date, cs, sm_factor,
  is.output = F, is.index = F)

Arguments

input_data

a data.table class dataset for modeling.

input_var

a data.table class dataset for variable coefficient.

y

a charactor for the dependent variable name in input_data.

y_m

a charactor for the mean of dependent variable name in input_data; default is NULL. If not NULL, then is.index must be True.

date

a charactor of the date variable name in input_data.

cs

a charactore vector for the cross section variable names in input_data. It could be more than one variable.

sm_factor

the smoothing factor for base exponential smoothing. The value range is from 0 to 1. The bigger, the more weight on current period status.

is.output

if TRUE, then output tabels to work directory. Default is False.

is.index

if TRUE, then y_m argument need to be setup. Default is False.

Value

a list of modeling result. It contains the following components: con: contribution table; decomp: decomp table; app: a shiny app;


xinzhou1023/lmdecomp documentation built on May 4, 2019, 1:07 p.m.