| dissimilarity {PriceIndices} | R Documentation |
Calculating the relative price and/or quantity dissimilarity measure between periods
Description
This function returns a value of the relative price and/or quantity dissimilarity measure.
Usage
dissimilarity(data, period1, period2, type = "p")
Arguments
data |
The user's data frame with information about sold products. It must contain columns: |
period1 |
The first period (as character) limited to the year and month, e.g. '2019-03'. |
period2 |
The second period (as character) limited to the year and month, e.g. '2019-04'. |
type |
The parameter indicates what type of dissimilarity measure is to be calculated. Possible values of the |
Value
This function returns a value of the relative price (dSP) and/or quantity (dSQ) dissimilarity measure. In a special case, when the type parameter is set to pq, the function provides the value of dSPQ measure (the relative price and quantity dissimilarity measure calculated as min(dSP,dSQ).
References
Diewert, E. (2020). The Chain Drift Problem and Multilateral Indexes. Chapter 6 in: Consumer Price Index Theory (draft)
Examples
dissimilarity(milk, period1="2018-12",period2="2019-12",type="q")
dissimilarity(milk, period1="2018-12",period2="2019-12",type="pq")