decomp_log: Decomp and contribution calculation function for...

Description Usage Arguments Value

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 smoother span. This gives the proportion of points in the plot which influence the smooth at each value. Larger values give more smoothness.

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;


drpmcain/decomp documentation built on May 15, 2019, 2:51 p.m.