| dissimilarity | R Documentation |
This function returns a value of the relative price and/or quantity dissimilarity measure.
dissimilarity(data, period1, period2, type = "p")
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 |
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).
Diewert, E. (2020). The Chain Drift Problem and Multilateral Indexes. Chapter 6 in: Consumer Price Index Theory (draft)
dissimilarity(milk, period1="2018-12",period2="2019-12",type="q")
dissimilarity(milk, period1="2018-12",period2="2019-12",type="pq")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.