This function returns multiplicative decompositions of the selected GEKS-type indices.
m_decomposition(
data,
start,
end,
wstart = start,
formula = c(),
window = 13,
sigma = 0.7,
index.value = TRUE
)
This function returns a list with three elements: multiplicative
- a data frame containing multiplicative decompositions of the indicated GEKS-type indices, normalized
- normalized multiplicative decompositions of the indicated indices (their product is always 1), impact
- relative impacts of commodities on the price index value (in p.p.).
The user's data frame with information about sold products. It must contain columns: time
(as Date in format: year-month-day,e.g. '2020-12-01'), prices
(as positive numeric), quantities
(as positive numeric) and prodID
(as numeric, factor or character).
The base period (as character) limited to the year and month, e.g. "2020-03".
The research period (as character) limited to the year and month, e.g. "2020-04".
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01".
A parameter indicating which multilateral formulas are to be decomposed. In the current version of the package, the multiplicative decomposition includes the following GEKS-type indices: GEKS, CCDI, GEKS-W, GEKS-L, GEKS-GL and GEKS-LM. Thus, this parameter can take values like: “geks”, ‘ccdi’, ‘geksw’ ‘geksl’, ‘geksgl’, ‘gekslm’.
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window).
The elasticity of substitution (a parameter used in the Lloyd-Moulton index formula). The default value is 0.7.
The parameter indicating whether price index values are to be displayed (at the end of the returned multiplicative
data frame).
Webster, M., Tarnow-Mordi, R. C. (2019). Decomposing Multilateral Price Indexes into the Contributions of Individual Commodities, Journal of Official Statistics, 35(2), 461-486.
m_decomposition(milk, start="2018-12",end="2019-12",formula=c("geks","ccdi"))$multiplicative
Run the code above in your browser using DataLab