elasticity {PriceIndices} | R Documentation |
Calculating the elasticity of substitution
Description
This function returns a value of the elasticity of substitution
Usage
elasticity(
data,
start,
end,
method = "lm",
left = -10,
right = 10,
precision = 1e-06
)
Arguments
data |
The user's data frame with information about sold products. It must contain columns: |
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". |
method |
The index formula for which the CES index will be equated to calculate the elasticity. Acceptable options are |
left |
The beginning of an interval for estimation of the elasticity of substitution (its default value is -10). |
right |
The end of an interval for estimation of the elasticity of substitution (its default value is 10). |
precision |
The precision of estimation (a 'stop' condition for the procedure). A default value of this parameter is 0.000001. |
Value
This function returns a value of the elasticity of substitution. If the method
parameter is set to lm
, 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. If the method
parameter is set to f
, the Fisher price index formula is used instead of the CW price index. If the method
parameter is set to t
, the Tornqvist price index formula is used instead of the CW price index. If the method
parameter is set to w
, the Walsh price index formula is used instead of the CW price index. If the method
parameter is set to sv
, the Sato-Vartia price index formula is used instead of the CW price index.The procedure continues until the absolute value of this difference is greater than the value of the 'precision' parameter.
References
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.
Examples
elasticity(coffee, start = "2018-12", end = "2019-01")
elasticity(coffee, start = "2018-12", end = "2019-01", method = "f")
elasticity(coffee, start = "2018-12", end = "2019-01", method = "sv")