This function returns a value of the elasticity of substitution
elasticity(data, start, end, left = -10, right = 10, precision = 1e-06)
This function returns a value of the elasticity of substitution. The procedure of estimation solves the equation: LM(sigma)-CW(sigma)=0 numerically, where LM denotes the Lloyd-Moulton price index, the CW denotes a current weight counterpart of the Lloyd-Moulton price index, and sigma is the elasticity of substitution parameter, which is estimated. The procedure continues until the absolute value of the LM-CW difference is greater than the value of the 'precision' parameter.
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 an interval for estimation of the elasticity of substitution (its default value is -10).
The end of an interval for estimation of the elasticity of substitution (its default value is 10).
The precision of estimation (a 'stop' condition for the procedure). A default value of this parameter is 0.000001.
de Haan, J., Balk, B.M., Hansen, C.B. (2010). Retrospective Approximations of Superlative Price Indexes for Years Where Expenditure Data Is Unavailable. In: Biggeri, L., Ferrari, G. (eds) Price Indexes in Time and Space. Contributions to Statistics. Physica-Verlag HD.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
elasticity(coffee, start = "2018-12", end = "2019-01")
Run the code above in your browser using DataLab