dissimilarity_fig {PriceIndices} | R Documentation |
Presenting the relative price and/or quantity dissimilarity measure over time
Description
This function presents values of the relative price and/or quantity dissimilarity measure over time.
Usage
dissimilarity_fig(
data,
start,
end,
type = "p",
benchmark = "end",
figure = TRUE,
date_breaks = "1 month"
)
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'. |
type |
The parameter indicates what type of dissimilarity measure is to be calculated. Possible values of the |
benchmark |
The benchmark period (as character) limited to the year and month, e.g. '2019-07'. |
figure |
A logical parameter indicating the resulting object. If it is TRUE, the function presents the above-mentioned dissimilarities over time via a figure. Otherwise, the function returns a dataframe. |
date_breaks |
A string giving the distance between breaks on the X axis like "1 month" (default value) or "4 months". |
Value
This function presents values of the relative price and/or quantity dissimilarity measure over time. The user can choose a benchmark period (defined by benchmark
) and the type of dissimilarity measure is to be calculated (defined by type
). The obtained results of dissimilarities over time can be presented in a dataframe form or via a figure (the default value of figure
is TRUE, which results in a figure).
References
Diewert, E. (2020). The Chain Drift Problem and Multilateral Indexes. Chapter 6 in: Consumer Price Index Theory (draft)
Examples
dissimilarity_fig(milk, start="2018-12",end="2019-12",type="q",figure=FALSE)
dissimilarity_fig(milk, start="2018-12",end="2019-12",type="pq",benchmark="start")