m_decomposition: Multiplicative decomposing the GEKS-type indices

View source: R/f_full_multilateral_indices.R

m_decompositionR Documentation

Multiplicative decomposing the GEKS-type indices

Description

This function returns multiplicative decompositions of the selected GEKS-type indices.

Usage

m_decomposition(
  data,
  start,
  end,
  wstart = start,
  formula = c(),
  window = 13,
  sigma = 0.7,
  index.value = TRUE
)

Arguments

data

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).

start

The base period (as character) limited to the year and month, e.g. "2020-03".

end

The research period (as character) limited to the year and month, e.g. "2020-04".

wstart

The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01".

formula

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’.

window

The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window).

sigma

The elasticity of substitution (a parameter used in the Lloyd-Moulton index formula). The default value is 0.7.

index.value

The parameter indicating whether price index values are to be displayed (at the end of the returned multiplicative data frame).

Value

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.).

References

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.

Examples

m_decomposition(milk, start="2018-12",end="2019-12",formula=c("geks","ccdi"))$multiplicative

JacekBialek/PriceIndices documentation built on Jan. 27, 2025, 6:14 a.m.