SPQ {PriceIndices} | R Documentation |
Calculating the multilateral SPQ price index
Description
This function returns a value of the multilateral SPQ price index which is based on the relative price and quantity dissimilarity measure.
Usage
SPQ(data, start, end, interval = FALSE)
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. '2019-03'. |
end |
The research period (as character) limited to the year and month, e.g. '2019-07'. |
interval |
A logical value indicating whether the function is to compare the research period defined by |
Value
This function returns a value of the multilateral SPQ price index which is based on the relative price and quantity dissimilarity measure (see References
). If the interval
parameter is set to TRUE, the function returns a vector of price index values without dates. To get information about both price index values and corresponding dates, please see functions: price_indices
or final_index
. The function does not take into account aggregating over outlets or product subgroups (to consider these types of aggregating, please use the final_index
function).
References
Diewert, E. (2020). The Chain Drift Problem and Multilateral Indexes. Chapter 6 in: Consumer Price Index Theory (draft)
Examples
SPQ(sugar, start="2018-12",end="2019-02")
SPQ(milk, start="2018-12",end="2019-12",interval=TRUE)