This function returns the multilateral Bennet price and quantity indicators and optionally also the price and quantity contributions of individual products.
mbennet(
data,
start,
end,
wstart = start,
matched = FALSE,
window = 13,
interval = FALSE,
contributions = FALSE,
prec = 2
)
This function returns the multilateral Bennet price and quantity indicators and optionally also the price and quantity contributions of individual products.
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) and prodID
(as numeric, factor or character). A column quantities
(as positive numeric) is also needed because this function uses unit values as monthly prices.
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 first period of the time window (as character) limited to the year and month, e.g. "2019-12".
A logical parameter indicating whether the matched sample approach is to be used (if yes, the parameter has the value TRUE).
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window).
A logical parameter indicating whether calculations are to be made for the whole time interval (TRUE) or no (FALSE).
A logical parameter indicating whether contributions of individual products are to be displayed. If it is TRUE
, then contributions are calculated for the the base period start
and the current period end
.
A numeric vector indicating precision, i.e. the number of decimal places for presenting results.
Bennet, T. L., (1920). The Theory of Measurement of Changes in Cost of Living. Journal of the Royal Statistical Society, 83, 455-462.
Fox, K.J., (2006). A Method for Transitive and Additive Multilateral Comparisons: A Transitive Bennet Indicator. Journal of Economics, 87(1), 73-87.
Białek, J. (2024). The use of the Bennet indicators and their transitive versions for scanner data analysis. Statistics in Transition new series, 25(3), 155-173.
mbennet(milk, "2018-12", "2019-12", matched=TRUE, contributions=TRUE)
mbennet(coffee, start="2018-12", end="2019-03", interval=TRUE)
Run the code above in your browser using DataLab