Title: | Calculating Bilateral and Multilateral Price Indexes |
---|---|
Description: | Preparing a scanner data set for price dynamics calculations (data selecting, data classification, data matching, data filtering). Computing bilateral and multilateral indexes. For details on these methods see: Diewert and Fox (2020) <doi:10.1080/07350015.2020.1816176>, Białek (2019) <doi:10.2478/jos-2019-0014> or Białek (2020) <doi:10.2478/jos-2020-0037>. |
Authors: | Jacek Białek [aut, cre] |
Maintainer: | Jacek Białek <[email protected]> |
License: | GPL-3 |
Version: | 0.2.2 |
Built: | 2024-12-09 06:36:01 UTC |
Source: | CRAN |
This function returns a value (or vector of values) of the bilateral AG Mean price index.
agmean(data, start, end, sigma = 0.7, interval = FALSE)
agmean(data, start, end, sigma = 0.7, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
sigma |
The elasticity of substitution parameter (as numeric) |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral AG Mean price index depending on the interval
parameter. 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).
Lent J., & Dorfman,A. H. (2009). Using a Weighted Average of Base Period Price Indexes to Approximate a Superlative Index. Journal of Official Statistics, 25(1), 139-149.
agmean(sugar, start="2019-01", end="2020-01",sigma=0.5) agmean(milk, start="2018-12", end="2020-01", interval=TRUE)
agmean(sugar, start="2019-01", end="2020-01",sigma=0.5) agmean(milk, start="2018-12", end="2020-01", interval=TRUE)
The function returns all values from the indicated column (defined by the type
parameter) which occur at least once in one of the compared periods or in a given time interval.
available(data, period1, period2, type = "prodID", interval = FALSE)
available(data, period1, period2, type = "prodID", interval = FALSE)
data |
The user's data frame. It must contain a column |
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 |
This parameters defines the column which is used in the procedure. Possible values of the |
interval |
A logical parameter indicating whether the procedure is to work for the whole time period between |
The function returns all values from the indicated column (defined by the type
parameter) which occur at least once in one of the compared periods or in a given time interval. Possible values of the type
parameter are: retID
, prodID
, codeIN
, codeOUT
or description
. If the interval
parameter is set to FALSE, then the function compares only periods defined by period1
and period2
. Otherwise the whole time period between period1
and period2
is considered.
available(milk, period1="2018-12", period2="2019-12", interval=TRUE) available(milk, period1="2018-12", period2="2019-12", type="description")
available(milk, period1="2018-12", period2="2019-12", interval=TRUE) available(milk, period1="2018-12", period2="2019-12", type="description")
This function returns a value (or vector of values) of the bilateral Banajree price index.
banajree(data, start, end, interval = FALSE)
banajree(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Banajree price index depending on the interval
parameter. 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)..
Banajree, K. S. (1977). On the factorial approach providing the true index of cost of living. Gottingen : Vandenhoeck und Ruprecht.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
banajree(sugar, start="2018-12", end="2019-12") banajree(milk, start="2018-12", end="2020-01", interval=TRUE)
banajree(sugar, start="2018-12", end="2019-12") banajree(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns the Bennet price and quantity indicators and optionally also the price and quantity contributions of individual products.
bennet( data, start, end, interval = FALSE, matched = FALSE, contributions = FALSE, prec = 2 )
bennet( data, start, end, interval = FALSE, matched = FALSE, contributions = FALSE, prec = 2 )
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical parameter indicating whether calculations are to be made for the whole time interval (TRUE) or no (FALSE). |
matched |
A logical parameter indicating whether the matched sample approach is to be used (if yes, the parameter has the value TRUE). |
contributions |
A logical parameter indicating whether contributions of individual products are to be displayed. If it is |
prec |
A numeric vector indicating precision, i.e. the number of decimal places for presenting results. |
This function returns the Bennet price and quantity indicators and optionally also the price and quantity contributions of individual products.
Bennet, T. L. (1920). The Theory of Measurement of Changes in Cost of Living. Journal of the Royal Statistical Society, 83, 455-462.
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.
bennet(milk, "2018-12", "2019-12", matched=TRUE, contributions=TRUE) bennet(coffee, start="2018-12", end="2019-03", interval=TRUE)
bennet(milk, "2018-12", "2019-12", matched=TRUE, contributions=TRUE) bennet(coffee, start="2018-12", end="2019-03", interval=TRUE)
This function returns a value (or vector of values) of the bilateral Bialek price index.
bialek(data, start, end, interval = FALSE)
bialek(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Bialek price index depending on the interval
parameter. 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).
Von der Lippe, P. (2012). Some short notes on the price index of Jacek Bialek. Econometrics (Ekonometria). 1(35), 76-83.
Bialek, J. (2013). Some Remarks on the Original Price Index Inspired by the Notes of Peter von der Lippe. Econometrics (Ekonometria), 3(41), 40-54.
Bialek, J. (2014). Simulation Study of an Original Price Index Formula. Communications in Statistics - Simulation and Computation, 43(2), 285-297
bialek(sugar, start="2018-12", end="2019-12") bialek(milk, start="2018-12", end="2020-01", interval=TRUE)
bialek(sugar, start="2018-12", end="2019-12") bialek(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the unweighted Balk-Mehrhoff-Walsh (BMW) price index.
bmw(data, start, end, interval = FALSE)
bmw(data, start, end, interval = FALSE)
data |
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the unweighted bilateral BMW price index depending on the interval
parameter. 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).
Mehrhoff, J.(2007). A linear approximation to the Jevons index. In: Von der Lippe (2007): Index Theory and Price Statistics, Peter Lang: Berlin, Germany.
(2018). Harmonised Index of Consumer Prices (HICP). Methodological Manual. Publication Office of the European union, Luxembourg.
bmw(sugar, start="2018-12", end="2019-12") bmw(milk, start="2018-12", end="2020-01", interval=TRUE)
bmw(sugar, start="2018-12", end="2019-12") bmw(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the unweighted bilateral Carli price index.
carli(data, start, end, interval = FALSE)
carli(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the unweighted bilateral Carli price index depending on the interval
parameter. 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).
Carli, G. (1804). Del valore e della proporzione de'metalli monetati. Scrittori Classici Italiani di Economia Politica, 13, 297-336.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
carli(sugar, start="2018-12", end="2019-12") carli(milk, start="2018-12", end="2020-01", interval=TRUE)
carli(sugar, start="2018-12", end="2019-12") carli(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value of the multilateral CCDI price index, i.e. the GEKS price index based on the superlative Tornqvist index formula.
ccdi(data, start, end, wstart = start, window = 13)
ccdi(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral CCDI price index (to be more precise: the GEKS index based on the Tornqvist formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Caves, D.W., Christensen, L.R. and Diewert, W.E. (1982). Multilateral comparisons of output, input, and productivity using superlative index numbers. Economic Journal 92, 73-86.
ccdi(milk, start="2019-01", end="2019-08",window=10) ccdi(milk, start="2018-12", end="2019-12")
ccdi(milk, start="2019-01", end="2019-08",window=10) ccdi(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral CCDI price index (GEKS based on the Tornqvist formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
ccdi_fbew(data, start, end)
ccdi_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral CCDI price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Caves, D.W., Christensen, L.R. and Diewert, W.E. (1982). Multilateral comparisons of output, input, and productivity using superlative index numbers. Economic Journal 92, 73-86.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
ccdi_fbew(milk, start="2018-12", end="2019-08")
ccdi_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral CCDI price index (GEKS based on the Tornqvist formula) extended by using the FBMW (Fixed Base Moving Window) method.
ccdi_fbmw(data, start, end)
ccdi_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral CCDI price index extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Caves, D.W., Christensen, L.R. and Diewert, W.E. (1982). Multilateral comparisons of output, input, and productivity using superlative index numbers. Economic Journal 92, 73-86.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
ccdi_fbmw(milk, start="2019-12", end="2020-04")
ccdi_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral CCDI price index (GEKS based on the Tornqvist formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
ccdi_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
ccdi_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral CCDI price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Caves, D.W., Christensen, L.R. and Diewert, W.E. (1982). Multilateral comparisons of output, input, and productivity using superlative index numbers. Economic Journal 92, 73-86.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
ccdi_splice(milk, start="2018-12", end="2020-02",splice="half")
ccdi_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value (or vector of values) of the monthly chained AG Mean price index.
chagmean(data, start, end, sigma = 0.7, interval = FALSE)
chagmean(data, start, end, sigma = 0.7, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
sigma |
The elasticity of substitution parameter (as numeric). |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained AG Mean price index depending on the interval
parameter. 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).
Lent J., & Dorfman,A. H. (2009). Using a Weighted Average of Base Period Price Indexes to Approximate a Superlative Index. Journal of Official Statistics, 25(1), 139-149.
chagmean(sugar, start="2019-01", end="2019-04",sigma=0.5) chagmean(milk, start="2018-12", end="2020-01", interval=TRUE)
chagmean(sugar, start="2019-01", end="2019-04",sigma=0.5) chagmean(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Banajree price index.
chbanajree(data, start, end, interval = FALSE)
chbanajree(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Banajree price index depending on the interval
parameter. 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).
Banajree, K. S. (1977). On the factorial approach providing the true index of cost of living. Gottingen : Vandenhoeck und Ruprecht.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chbanajree(sugar, start="2018-12", end="2019-04") chbanajree(milk, start="2018-12", end="2020-01", interval=TRUE)
chbanajree(sugar, start="2018-12", end="2019-04") chbanajree(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Bialek price index.
chbialek(data, start, end, interval = FALSE)
chbialek(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Bialek price index depending on the interval
parameter. 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).
Von der Lippe, P. (2012). Some short notes on the price index of Jacek Bialek. Econometrics (Ekonometria). 1(35), 76-83.
Bialek, J. (2013). Some Remarks on the Original Price Index Inspired by the Notes of Peter von der Lippe. Econometrics (Ekonometria), 3(41), 40-54.
Bialek, J. (2014). Simulation Study of an Original Price Index Formula. Communications in Statistics - Simulation and Computation, 43(2), 285-297
chbialek(sugar, start="2018-12", end="2019-04") chbialek(milk, start="2018-12", end="2020-01", interval=TRUE)
chbialek(sugar, start="2018-12", end="2019-04") chbialek(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Balk-Mehrhoff-Walsh (BMW) price index.
chbmw(data, start, end, interval = FALSE)
chbmw(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained BMW price index depending on the interval
parameter. 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).
Mehrhoff, J.(2007). A linear approximation to the Jevons index. In: Von der Lippe (2007): Index Theory and Price Statistics, Peter Lang: Berlin, Germany.
(2018). Harmonised Index of Consumer Prices (HICP). Methodological Manual. Publication Office of the European union, Luxembourg.
chbmw(sugar, start="2018-12", end="2019-04") chbmw(milk, start="2018-12", end="2020-01", interval=TRUE)
chbmw(sugar, start="2018-12", end="2019-04") chbmw(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Carli price index.
chcarli(data, start, end, interval = FALSE)
chcarli(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Carli price index depending on the interval
parameter. 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).
Carli, G. (1804). Del valore e della proporzione de'metalli monetati. Scrittori Classici Italiani di Economia Politica, 13, 297-336.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chcarli(sugar, start="2018-12", end="2019-04") chcarli(milk, start="2018-12", end="2020-01", interval=TRUE)
chcarli(sugar, start="2018-12", end="2019-04") chcarli(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Carruthers-Sellwood-Ward-Dalen (CSWD) price index.
chcswd(data, start, end, interval = FALSE)
chcswd(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained CSWD price index depending on the interval
parameter. 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).
Carruthers, A.G., Sellwood, D. J, Ward, P. W. (1980). Recent developments in the retail price index. Journal of the Royal Statistical Society. Series D (The Statisticain), 29(1), 1-32.
Dalen, J. (1992). Recent developments in the retail price index. The Statistician, 29(1), 1-32.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chcswd(sugar, start="2018-12", end="2019-04") chcswd(milk, start="2018-12", end="2020-01", interval=TRUE)
chcswd(sugar, start="2018-12", end="2019-04") chcswd(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Davies price index.
chdavies(data, start, end, interval = FALSE)
chdavies(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Davies price index depending on the interval
parameter. 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).
Davies, G. R. (1924). The Problem of a Standard Index Number Formula. Journal of the American Statistical Association, 19 (146), 180-188.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chdavies(sugar, start="2018-12", end="2019-04") chdavies(milk, start="2018-12", end="2020-01", interval=TRUE)
chdavies(sugar, start="2018-12", end="2019-04") chdavies(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Dikhanov price index.
chdikhanov(data, start, end, interval = FALSE)
chdikhanov(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Dikhanov price index depending on the interval
parameter. 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).
Dikhanov, Y., (2024). A New Elementary Index Number. Paper presented at the 18th Meeting of the Ottawa Group on Price Indices, Ottawa, Canada.
chdikhanov(sugar, start="2018-12", end="2019-04") chdikhanov(milk, start="2018-12", end="2020-01", interval=TRUE)
chdikhanov(sugar, start="2018-12", end="2019-04") chdikhanov(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Drobisch price index.
chdrobisch(data, start, end, interval = FALSE)
chdrobisch(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Drobisch price index depending on the interval
parameter. 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).
Drobisch, M. W. (1871). Ueber einige Einwurfe gegen die in diesen Jahrbuchern veroffentlichte neue Methode, die Veranderungen der Waarenpreise und des Geldwerths zu berechten.Jahrbucher fur Nationalokonomie und Statistik, Vol. 16, s. 416-427.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chdrobisch(sugar, start="2018-12", end="2019-04") chdrobisch(milk, start="2018-12", end="2020-01", interval=TRUE)
chdrobisch(sugar, start="2018-12", end="2019-04") chdrobisch(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Dutot price index.
chdutot(data, start, end, interval = FALSE)
chdutot(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Dutot price index depending on the interval
parameter. 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).
Dutot, C. F., (1738). Reflexions Politiques sur les Finances et le Commerce. The Hague: Les Freres Vaillant et Nicolas Prevost, Vol. 1.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chdutot(sugar, start="2018-12", end="2019-04") chdutot(milk, start="2018-12", end="2020-01", interval=TRUE)
chdutot(sugar, start="2018-12", end="2019-04") chdutot(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Fisher price index.
chfisher(data, start, end, interval = FALSE)
chfisher(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Fisher price index depending on the interval
parameter. 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).
Fisher, I. (1922). The Making of Index Numbers. Boston: Houghton Mifflin.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chfisher(sugar, start="2018-12", end="2019-04") chfisher(milk, start="2018-12", end="2020-01", interval=TRUE)
chfisher(sugar, start="2018-12", end="2019-04") chfisher(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Geary-Khamis price index.
chgeary_khamis(data, start, end, interval = FALSE)
chgeary_khamis(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Geary-Khamis price index depending on the interval
parameter (please use gk
function to calculate the multilateral Geary-Khamis price index). 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 (see the final_index
function).
Geary, R. G. (1958). A Note on Comparisons of Exchange Rates and Purchasing Power between Countries. Journal of the Royal Statistical Society, Series A, 121, 97-99.
Khamis, S. H. (1970). Properties and Conditions for the Existence of a new Type of Index Number. Sankhya Series B32, 81-98.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chgeary_khamis(sugar, start="2018-12", end="2019-04") chgeary_khamis(milk, start="2018-12", end="2020-01", interval=TRUE)
chgeary_khamis(sugar, start="2018-12", end="2019-04") chgeary_khamis(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained geohybrid price index. The geohybrid index was proposed by Bialek (2020) and it uses correlation coefficients between prices and quantities.
chgeohybrid(data, start, end, base = start, interval = FALSE)
chgeohybrid(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the geohybrid price index formula (as character) limited to the year and month, e.g. "2020-01" |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained geohybrid price index depending on the interval
parameter. 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).
Bialek, J. (2020). Proposition of a Hybrid Price Index Formula for the Consumer Price Index Measurement. Equilibrium. Quarterly Journal of Economics and Economic Policy, 15(4), 697-716.
chgeohybrid(sugar, start="2019-12", end="2020-05", base="2018-12") chgeohybrid(milk, start="2019-12", end="2020-08", base="2018-12", interval=TRUE)
chgeohybrid(sugar, start="2019-12", end="2020-05", base="2018-12") chgeohybrid(milk, start="2019-12", end="2020-08", base="2018-12", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained geo-logarithmic Laspeyres price index.
chgeolaspeyres(data, start, end, interval = FALSE)
chgeolaspeyres(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained geo-logarithmic Laspeyres price index depending on the interval
parameter. 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).
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chgeolaspeyres(sugar, start="2018-12", end="2019-04") chgeolaspeyres(milk, start="2018-12", end="2020-01", interval=TRUE)
chgeolaspeyres(sugar, start="2018-12", end="2019-04") chgeolaspeyres(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained geometric Lowe price index.
chgeolowe(data, start, end, base = start, interval = FALSE)
chgeolowe(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the geometric Lowe price index formula (as character) limited to the year and month, e.g. "2020-01" |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained geometric Lowe price index depending on the interval
parameter. 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).
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chgeolowe(sugar, start="2019-01", end="2019-04",base="2018-12") chgeolowe(milk, start="2018-12", end="2020-01", interval=TRUE)
chgeolowe(sugar, start="2019-01", end="2019-04",base="2018-12") chgeolowe(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained geo-logarithmic Paasche price index.
chgeopaasche(data, start, end, interval = FALSE)
chgeopaasche(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained geo-logarithmic Paasche price index depending on the interval
parameter. 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).
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chgeopaasche(sugar, start="2018-12", end="2019-04") chgeopaasche(milk, start="2018-12", end="2020-01", interval=TRUE)
chgeopaasche(sugar, start="2018-12", end="2019-04") chgeopaasche(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained geometric Young price index.
chgeoyoung(data, start, end, base = start, interval = FALSE)
chgeoyoung(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the geometric Young price index formula (as character) limited to the year and month, e.g. "2020-01". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained geometric Young price index depending on the interval
parameter. 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).
Young, A. H. (1992). Alternative Measures of Change in Real Output and Prices. Survey of Current Business, 72, 32-48.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chgeoyoung(sugar, start="2019-01", end="2019-04",base="2018-12") chgeoyoung(milk, start="2018-12", end="2020-01", interval=TRUE)
chgeoyoung(sugar, start="2019-01", end="2019-04",base="2018-12") chgeoyoung(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained "unnamed" harmonic price index.
chharmonic(data, start, end, interval = FALSE)
chharmonic(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained harmonic price index depending on the interval
parameter. 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).
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chharmonic(sugar, start="2018-12", end="2019-04") chharmonic(milk, start="2018-12", end="2020-01", interval=TRUE)
chharmonic(sugar, start="2018-12", end="2019-04") chharmonic(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained hybrid price index. The hybrid index was proposed by Bialek (2020) and it uses correlation coefficients between prices and quantities.
chhybrid(data, start, end, base = start, interval = FALSE)
chhybrid(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the hybrid price index formula (as character) limited to the year and month, e.g. "2020-01" |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained hybrid price index depending on the interval
parameter. 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).
Bialek, J. (2020). Proposition of a Hybrid Price Index Formula for the Consumer Price Index Measurement. Equilibrium. Quarterly Journal of Economics and Economic Policy, 15(4), 697-716.
chhybrid(sugar, start="2019-12", end="2020-05", base="2018-12") chhybrid(milk, start="2019-12", end="2020-08", base="2018-12", interval=TRUE)
chhybrid(sugar, start="2019-12", end="2020-05", base="2018-12") chhybrid(milk, start="2019-12", end="2020-08", base="2018-12", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained implicit quadratic mean of order r price index.
chIQMp(data, start, end, r = 2, interval = FALSE)
chIQMp(data, start, end, r = 2, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter. |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained implicit quadratic mean of order r price index - see CPI Manual (2004), Section 17.37, formula 17.32 (page 321).
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chIQMp(sugar, start="2019-01", end="2020-01") chIQMp(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
chIQMp(sugar, start="2019-01", end="2020-01") chIQMp(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Jevons price index
chjevons(data, start, end, interval = FALSE)
chjevons(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Jevons price index depending on the interval
parameter. 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).
Jevons, W. S., (1865). The variation of prices and the value of the currency since 1782. J. Statist. Soc. Lond., 28, 294-320.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chjevons(sugar, start="2018-12", end="2019-04") chjevons(milk, start="2018-12", end="2020-01", interval=TRUE)
chjevons(sugar, start="2018-12", end="2019-04") chjevons(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Laspeyres price index.
chlaspeyres(data, start, end, interval = FALSE)
chlaspeyres(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Laspeyres price index depending on the interval
parameter. 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).
Laspeyres, E. (1871). Die Berechnung einer mittleren Waarenpreissteigerung. Jahrbucher fur Nationalokonomie und Statistik 16, 296-314.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chlaspeyres(sugar, start="2018-12", end="2019-04") chlaspeyres(milk, start="2018-12", end="2020-01", interval=TRUE)
chlaspeyres(sugar, start="2018-12", end="2019-04") chlaspeyres(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Lehr price index.
chlehr(data, start, end, interval = FALSE)
chlehr(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Lehr price index depending on the interval
parameter. 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).
Lehr, J. (1885). Beitrage zur Statistik der Preise, insbesondere des Geldes und des Holzes. J. D. Sauerlander, Frankfurt am Main.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chlehr(sugar, start="2018-12", end="2019-04") chlehr(milk, start="2018-12", end="2020-01", TRUE)
chlehr(sugar, start="2018-12", end="2019-04") chlehr(milk, start="2018-12", end="2020-01", TRUE)
This function returns a value (or vector of values) of the monthly chained Lloyd-Moulton price index.
chlloyd_moulton(data, start, end, sigma = 0.7, interval = FALSE)
chlloyd_moulton(data, start, end, sigma = 0.7, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
sigma |
The elasticity of substitution parameter (as numeric). |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Lloyd-Moulton price index depending on the interval
parameter. 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).
Lloyd, P. J. (1975). Substitution Effects and Biases in Nontrue Price Indices. The American Economic Review, 65, 301-313.
Moulton, B. R. (1996). Constant Elasticity Cost-of-Living Index in Share-Relative Form. Washington DC: U. S. Bureau of Labor Statistics, mimeograph
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chlloyd_moulton(sugar, start="2018-12", end="2019-04",sigma=0.9) chlloyd_moulton(milk, start="2018-12", end="2020-01", interval=TRUE)
chlloyd_moulton(sugar, start="2018-12", end="2019-04",sigma=0.9) chlloyd_moulton(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Lowe price index.
chlowe(data, start, end, base = start, interval = FALSE)
chlowe(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the Lowe price index formula (as character) limited to the year and month, e.g. "2020-01". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Lowe price index depending on the interval
parameter. 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).
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chlowe(sugar, start="2019-01", end="2019-04",base="2018-12") chlowe(milk, start="2018-12", end="2020-01", interval=TRUE)
chlowe(sugar, start="2019-01", end="2019-04",base="2018-12") chlowe(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Marshall-Edgeworth price index.
chmarshall_edgeworth(data, start, end, interval = FALSE)
chmarshall_edgeworth(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Marshall-Edgeworth price index depending on the interval
parameter. 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).
Marshall, A. (1887). Remedies for Fluctuations of General Prices. Contemporary Review, 51, 355-375.
Edgeworth, F. Y. (1887). Measurement of Change in Value of Money I. The first Memorandum presented to the British Association for the Advancement of Science; reprinted in Papers Relating to Political Economy, Vol. 1, New York, Burt Franklin, s. 1925.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chmarshall_edgeworth(sugar, start="2018-12", end="2019-04") chmarshall_edgeworth(milk, start="2018-12", end="2020-01", interval=TRUE)
chmarshall_edgeworth(sugar, start="2018-12", end="2019-04") chmarshall_edgeworth(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Paasche price index.
chpaasche(data, start, end, interval = FALSE)
chpaasche(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Paasche price index depending on the interval
parameter. 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).
Paasche, H. (1874). Uber die Preisentwicklung der letzten Jahre nach den Hamburger Borsennotirungen. Jahrbucher fur Nationalokonomie und Statistik, 12, 168-178.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chpaasche(sugar, start="2018-12", end="2019-04") chpaasche(milk, start="2018-12", end="2020-01", interval=TRUE)
chpaasche(sugar, start="2018-12", end="2019-04") chpaasche(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Palgrave price index.
chpalgrave(data, start, end, interval = FALSE)
chpalgrave(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Palgrave price index depending on the interval
parameter. 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).
Palgrave, R. H. I. (1886). Currency and Standard of Value in England, France and India and the Rates of Exchange Between these Countries. Memorandum submitted to the Royal Commission on Depression of trade and Industry, Third Report, Appendix B, 312-390.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chpalgrave(sugar, start="2018-12", end="2019-04") chpalgrave(milk, start="2018-12", end="2020-01", interval=TRUE)
chpalgrave(sugar, start="2018-12", end="2019-04") chpalgrave(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained quadratic mean of order r price index.
chQMp(data, start, end, r = 2, interval = FALSE)
chQMp(data, start, end, r = 2, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter. |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained quadratic mean of order r price index - see CPI Manual (2004), Section 17.40, formula 17.35 (page 321).
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chQMp(sugar, start="2019-01", end="2020-01") chQMp(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
chQMp(sugar, start="2019-01", end="2020-01") chQMp(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
This function returns a value (or vector of values) of the monthly chained quadratic mean of order r quantity index.
chQMq(data, start, end, r = 2, interval = FALSE)
chQMq(data, start, end, r = 2, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter. |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained quadratic mean of order r quantity index - see CPI Manual (2004), Section 17.35, formula 17.30 (page 321).
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chQMq(sugar, start="2019-01", end="2020-01") chQMq(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
chQMq(sugar, start="2019-01", end="2020-01") chQMq(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Vartia-II (Sato-Vartia) price index.
chsato_vartia(data, start, end, interval = FALSE)
chsato_vartia(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Vartia-II (Sato-Vartia) price index depending on the interval
parameter. 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).
Sato, K. (1976). The Ideal Log-Change Index Number. The Review of Economics and Statistics, 58(2), 223-228.
Vartia, Y. 0. (1976). Ideal Log-Change Index Numbers . Scandinavian Journal of Statistics 3(3), 121-126.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chsato_vartia(sugar, start="2018-12", end="2019-04") chsato_vartia(milk, start="2018-12", end="2020-01", interval=TRUE)
chsato_vartia(sugar, start="2018-12", end="2019-04") chsato_vartia(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Stuvel price index.
chstuvel(data, start, end, interval = FALSE)
chstuvel(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Stuvel price index depending on the interval
parameter. 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).
Stuvel, G. (1957). A New Index Number Formula. Econometrica, 25, 123-131.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chstuvel(sugar, start="2018-12", end="2019-04") chstuvel(milk, start="2018-12", end="2020-01", interval=TRUE)
chstuvel(sugar, start="2018-12", end="2019-04") chstuvel(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Tornqvist price index.
chtornqvist(data, start, end, interval = FALSE)
chtornqvist(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Tornqvist price index depending on the interval
parameter. 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).
Tornqvist, L. (1936). The Bank of Finland's Consumption Price Index. Bank of Finland Monthly Bulletin 10, 1-8.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chtornqvist(sugar, start="2018-12", end="2019-04") chtornqvist(milk, start="2018-12", end="2020-01", interval=TRUE)
chtornqvist(sugar, start="2018-12", end="2019-04") chtornqvist(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Vartia-I price index.
chvartia(data, start, end, interval = FALSE)
chvartia(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Vartia-I price index depending on the interval
parameter. 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).
Vartia, Y. 0. (1976). Ideal Log-Change Index Numbers . Scandinavian Journal of Statistics 3(3), 121-126.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chvartia(sugar, start="2018-12", end="2019-04") chvartia(milk, start="2018-12", end="2020-01", interval=TRUE)
chvartia(sugar, start="2018-12", end="2019-04") chvartia(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Walsh price index.
chwalsh(data, start, end, interval = FALSE)
chwalsh(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Walsh price index depending on the interval
parameter. 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).
Walsh, C. M. (1901). The Measurement of General Exchange Value. The MacMillan Company, New York.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
chwalsh(sugar, start="2018-12", end="2019-04") chwalsh(milk, start="2018-12", end="2020-01", interval=TRUE)
chwalsh(sugar, start="2018-12", end="2019-04") chwalsh(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the monthly chained Young price index.
chyoung(data, start, end, base = start, interval = FALSE)
chyoung(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the Young price index formula (as character) limited to the year and month, e.g. "2020-01". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the monthly chained Young price index depending on the interval
parameter. 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).
Young, A. H. (1992). Alternative Measures of Change in Real Output and Prices. Survey of Current Business, 72, 32-48.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
chyoung(sugar, start="2019-01", end="2019-04",base="2018-12") chyoung(milk, start="2018-12", end="2020-01", interval=TRUE)
chyoung(sugar, start="2019-01", end="2019-04",base="2018-12") chyoung(milk, start="2018-12", end="2020-01", interval=TRUE)
A collection of scanner data on the sale of coffee in one of Polish supermarkets in the period from December 2017 to October 2020
coffee
coffee
A data frame with 6 columns and 42561 rows. The used variables are as follows:
time
- Dates of transactions (Year-Month-Day)
prices
- Prices of sold products [PLN]
quantities
- Quantities of sold products [kg]
prodID
- Unique product codes (data set contains 79 different prodIDs)
retID
- Unique codes identifying outlets/retailer sale points (data set contains 20 different retIDs)
description
Descriptions of sold coffee products (data set contains 3 different product descriptions)
The function calculates distances between price indices
compare_distances( data = data.frame(), measure = "MAD", pp = TRUE, first = FALSE, prec = 3 )
compare_distances( data = data.frame(), measure = "MAD", pp = TRUE, first = FALSE, prec = 3 )
data |
A data frame containg values of indices which are to be compared |
measure |
A parameter specifying what measure should be used to compare the indexes. Possible parameter values are: "MAD" (Mean Absolute Distance) or "RMSD" (Root Mean Square Distance). |
pp |
Logical parameter indicating whether the results are to be presented in percentage points (then |
first |
A logical parameter that determines whether the first row of the data frame is to be taken into account when calculating the distance between the indices (then |
prec |
Parameter that determines how many decimal places are to be used in the presentation of results. |
The function calculates average distances between price indices and it returns a data frame with these values for each pair of price indices.
#Creating a data frame with unweighted bilateral index values df<-price_indices(milk, formula=c("jevons","dutot","carli"), start="2018-12", end="2019-12",interval=TRUE) #Calculating average distances between indices (in p.p) compare_distances(df)
#Creating a data frame with unweighted bilateral index values df<-price_indices(milk, formula=c("jevons","dutot","carli"), start="2018-12", end="2019-12",interval=TRUE) #Calculating average distances between indices (in p.p) compare_distances(df)
This function returns a figure with plots of selected price indices.
compare_indices_df( data, names = colnames(data)[2:length(colnames(data))], date_breaks = "1 month" )
compare_indices_df( data, names = colnames(data)[2:length(colnames(data))], date_breaks = "1 month" )
data |
The user's data frame with price index values. It must contain columns: |
names |
A vector of strings indicating names of indices which are to be used in the figure's legend. |
date_breaks |
A string giving the distance between breaks on the X axis like "1 month" (default value) or "4 months". |
This function returns a figure with plots of previously calculated indices (together with dates on X-axis and a corresponding legend). Indices must be provided as a data frame, where the the first column must includes dates limited to the year and month (e.g.: "2020-04").
df<-price_indices(milk, start = "2018-12", end = "2019-12", formula=c("laspeyres", "fisher"), interval = TRUE) compare_indices_df(df)
df<-price_indices(milk, start = "2018-12", end = "2019-12", formula=c("laspeyres", "fisher"), interval = TRUE) compare_indices_df(df)
This function presents a comparison of selected indices obtained by using the jackknife method.
compare_indices_jk( data, start, end, by = "prodID", formula = c(), window = c(), splice = c(), base = c(), sigma = c(), r = c(), names = c(), title_iterations = c(), title_pseudovalues = c() )
compare_indices_jk( data, start, end, by = "prodID", formula = c(), window = c(), splice = c(), base = c(), sigma = c(), r = c(), names = c(), title_iterations = c(), title_pseudovalues = c() )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
by |
A character string which indicates a column name for creating product subgroups (in the classical jackknife method |
formula |
A vector of character strings indicating price index formulas that are to be calculated. To see available options please use the link: |
window |
A vector of integers. Each element of the vector defines the length of the time window of the corresponding multilateral index. |
splice |
A vector of character strings. Each element of the vector indicates the splicing method is to be used for the corresponding multilateral index. Available values of vector elements are: "movement", "window","half","mean" and their additional variants: "window_published", "half_published" and "mean_published". |
base |
The vector of prior periods used in the Young- or Lowe-type price indices or hybrid/geohybrid index. Each element of the vector (as character) must be limited to the year and month, e.g. "2020-01". |
sigma |
The vector of elasticity of substitution parameters used in the Lloyed-Moulton, AG Mean or GEKS-LM indices (as numeric). |
r |
The vector of non-zero parameters used in the quadratic mean of order r quantity / price index or in the GEKS-QM index (as numeric). |
names |
A vector of strings indicating names of indices which are to be used in the resulting data frame. |
title_iterations |
A character string indicating a title of the created box-plot for iteration index values. |
title_pseudovalues |
A character string indicating a title of the created box-plot for obtained (jackknife) index pseudovalues. |
This function presents a comparison of selected indices obtained by using the jackknife method. In particular, it returns a list with four elements: iterations
, which is a data frame with basic characteristics of the calculated iteration index values (means, standard deviations, coefficients of variation and results for all sample), pseudovalues
, which is a data frame with basic characteristics of the calculated index pseudovalues obtained in the jackknife procedure (i.e. the jackknife estimators and their standard deviations and coefficients of variation), figure_iterations
which presents a box-plot for the calculated iteration index values, and figure_pseudovalues
which presents a box-plot for the calculated index pseudovalues obtained in the jackknife procedure.
Quenouille, M.H. (1956). Notes on bias in estimation. Biometrika, 43 (3–4), 353–360
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
milk.<-dplyr::filter(milk, milk$prodID %in% sample(unique(milk$prodID),4)) #creating a list with jackknife results comparison<-compare_indices_jk(milk., formula=c("jevons","fisher"), start="2018-12", end="2019-12", names=c("Jevons","Fisher"), title_iterations="Box-plots for iteration values (milk products)", title_pseudovalues="Box-plots for pseudovalues (milk products)") #displaying results comparison$iterations comparison$pseudovalues comparison$figure_iterations comparison$figure_pseudovalues
milk.<-dplyr::filter(milk, milk$prodID %in% sample(unique(milk$prodID),4)) #creating a list with jackknife results comparison<-compare_indices_jk(milk., formula=c("jevons","fisher"), start="2018-12", end="2019-12", names=c("Jevons","Fisher"), title_iterations="Box-plots for iteration values (milk products)", title_pseudovalues="Box-plots for pseudovalues (milk products)") #displaying results comparison$iterations comparison$pseudovalues comparison$figure_iterations comparison$figure_pseudovalues
This function returns a figure with plots of previously calculated price indices.
compare_indices_list(data = list(), names = c(), date_breaks = "1 month")
compare_indices_list(data = list(), names = c(), date_breaks = "1 month")
data |
A list of data frames with previously calculated price indices. Each data frame must consist of two columns, i.e. the first column must includes dates limited to the year and month (e.g.: "2020-04") and the second column must indicate price index values for corresponding dates. The above-mentioned single data frame may be created manually in the previous step or it may be a result of functions: |
names |
A vector of character strings describing names of presented indices. |
date_breaks |
A string giving the distance between breaks on the X axis like "1 month" (default value) or "4 months". |
This function returns a figure with plots of previously calculated price indices. It allows for graphical comparison of price index values which were previously calculated and now are provided as a list of data frames (see data
parameter).
## Caluclating two indices by using two different package functions: index1<-final_index(data=milk, start="2018-12", end="2019-12",formula="walsh",interval=TRUE) index2<-price_indices(milk,start="2018-12", end="2019-12", formula="geks",window=13,interval=TRUE) ## Graphical comparison of these two indices compare_indices_list(data=list(index1,index2), names=c("Walsh index", "GEKS index"))
## Caluclating two indices by using two different package functions: index1<-final_index(data=milk, start="2018-12", end="2019-12",formula="walsh",interval=TRUE) index2<-price_indices(milk,start="2018-12", end="2019-12", formula="geks",window=13,interval=TRUE) ## Graphical comparison of these two indices compare_indices_list(data=list(index1,index2), names=c("Walsh index", "GEKS index"))
The function calculates distances between considered price indices and the target price index
compare_to_target( data = data.frame(), target, measure = "MAD", pp = TRUE, first = FALSE, prec = 3 )
compare_to_target( data = data.frame(), target, measure = "MAD", pp = TRUE, first = FALSE, prec = 3 )
data |
A data frame containg values of indices which are to be compared to the target price index |
target |
A data frame or a vector containg values of the target price index |
measure |
A parameter specifying what measure should be used to compare indices. Possible parameter values are: "MAD" (Mean Absolute Distance) or "RMSD" (Root Mean Square Distance). |
pp |
Logical parameter indicating whether the results are to be presented in percentage points (then |
first |
A logical parameter that determines whether the first row of the data frame and the first row of the 'target' data frame (or its first element if it is a vector) are to be taken into account when calculating the distance between the indices (then |
prec |
Parameter that determines how many decimal places are to be used in the presentation of results. |
The function calculates average distances between considered price indices and the target price index and it returns a data frame with: average distances on the basis of all values of compared indices ('distance' column), average semi-distances on the basis of values of compared indices which overestimate the target index values ('distance_upper' column) and average semi-distances on the basis of values of compared indices which underestimate the target index values ('distance_lower' column).
#Creating a data frame with example bilateral indices df<-price_indices(milk, formula=c("jevons","laspeyres","paasche","walsh"), start="2018-12",end="2019-12",interval=TRUE) #Calculating the target Fisher price index target_index<-fisher(milk,start="2018-12",end="2019-12",interval=TRUE) #Calculating average distances between considered indices and the Fisher index (in p.p) compare_to_target(df,target=target_index)
#Creating a data frame with example bilateral indices df<-price_indices(milk, formula=c("jevons","laspeyres","paasche","walsh"), start="2018-12",end="2019-12",interval=TRUE) #Calculating the target Fisher price index target_index<-fisher(milk,start="2018-12",end="2019-12",interval=TRUE) #Calculating average distances between considered indices and the Fisher index (in p.p) compare_to_target(df,target=target_index)
This function returns a value (or vector of values) of the unweighted Carruthers-Sellwood-Ward-Dalen (CSWD) price index.
cswd(data, start, end, interval = FALSE)
cswd(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the unweighted bilateral CSWD price index depending on the interval
parameter. 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).
Carruthers, A.G., Sellwood, D. J, Ward, P. W. (1980). Recent developments in the retail price index. Journal of the Royal Statistical Society. Series D (The Statisticain), 29(1), 1-32.
Dalen, J. (1992). Recent developments in the retail price index. The Statistician, 29(1), 1-32.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
cswd(sugar, start="2018-12", end="2019-12") cswd(milk, start="2018-12", end="2020-01", interval=TRUE)
cswd(sugar, start="2018-12", end="2019-12") cswd(milk, start="2018-12", end="2020-01", interval=TRUE)
The function aggregates the user's data frame over time and optionally over outlets.
data_aggregating(data, join_outlets = TRUE)
data_aggregating(data, join_outlets = TRUE)
data |
The user's data frame. |
join_outlets |
A logical value indicating whether the data aggregation over outlets should be also done. |
The function aggregates the user's data frame over time and/or over outlets. Consequently, we obtain monthly data, where the unit value is calculated instead of a price for each prodID
observed in each month (the time
column gets the Date format: "Year-Month-01"). If the parameter join_outlets
is TRUE, then the function also performs aggregation over outlets (retIDs) and the retID
column is removed from the data frame. The main advantage of using this function is the ability to reduce the size of the data frame and the time needed to calculate the price index. Please note, that unnecessary columns are removed (e.g. description
).
#Example 1 data_aggregating(dataAGGR,join_outlets = FALSE) data_aggregating(dataAGGR,join_outlets = TRUE) #Example 2 (data frame reduction) nrow(milk) nrow(data_aggregating(milk))
#Example 1 data_aggregating(dataAGGR,join_outlets = FALSE) data_aggregating(dataAGGR,join_outlets = TRUE) #Example 2 (data frame reduction) nrow(milk) nrow(data_aggregating(milk))
The function checks if the argument data
points to a data frame which is suitable for further price index calculation. In particular, the function checks whether the indicated data frame contains the required columns and whether they are of the appropriate type (if not, the function returns FALSE and an appropriate comment).
data_check(data)
data_check(data)
data |
Any R object but ultimately it is a data frame. |
The function returns TRUE if the data frame indicated by the data
parameter is suitable for the calculation of price indices and returns FALSE otherwise.
data_check(milk) data_check(iris)
data_check(milk) data_check(iris)
This function predicts product class levels via the selected machine learning model.
data_classifying(model = list(), data)
data_classifying(model = list(), data)
model |
A list of 8 elements which identify the previously built machine learning model (the list is obtained via the |
data |
A data set for the model (products with their characteristics). This data set must contain all the columns which were used in the built model. |
This function provides the indicated data set with an additional column, i.e. class_predicted
, which is obtained by using the selected machine learning model.
#Building the model my.grid=list(eta=c(0.01,0.02,0.05),subsample=c(0.5,0.8)) data_train<-dplyr::filter(dataCOICOP,dataCOICOP$time<=as.Date("2021-10-01")) data_test<-dplyr::filter(dataCOICOP,dataCOICOP$time==as.Date("2021-11-01")) ML<-model_classification(data_train,data_test,class="coicop6",grid=my.grid, indicators=c("description","codeIN", "grammage"),key_words=c("uht"),rounds=60) #Data classification data_classifying(ML, data_test)
#Building the model my.grid=list(eta=c(0.01,0.02,0.05),subsample=c(0.5,0.8)) data_train<-dplyr::filter(dataCOICOP,dataCOICOP$time<=as.Date("2021-10-01")) data_test<-dplyr::filter(dataCOICOP,dataCOICOP$time==as.Date("2021-11-01")) ML<-model_classification(data_train,data_test,class="coicop6",grid=my.grid, indicators=c("description","codeIN", "grammage"),key_words=c("uht"),rounds=60) #Data classification data_classifying(ML, data_test)
A collection of scanner data on the sale of coffee in the period from January 2024 to February 2024
data_DOWN_UP_SIZED
data_DOWN_UP_SIZED
A data frame with 6 columns and 51 rows. The used variables are as follows:
time
- Dates of transactions (Year-Month-Day)
prices
- Prices of sold products [PLN]
quantities
- Quantities of sold products [liters]
codeIN
- Unique internal product codes (retaler product codes)
codeOUT
- Unique external product codes (e.g. GTIN, EAN, SKU)
description
- Descriptions of sold coffee products
This function returns a filtered data set, i.e. a reduced user's data frame with the same columns and rows limited by a criterion defined by filters
.
data_filtering( data, start, end, filters = c(), plimits = c(), pquantiles = c(), dplimits = c(), lambda = 1.25, interval = FALSE, retailers = FALSE )
data_filtering( data, start, end, filters = c(), plimits = c(), pquantiles = c(), dplimits = c(), lambda = 1.25, interval = FALSE, retailers = FALSE )
data |
The user's data frame with information about products to be filtered. It must contain columns: |
start |
The base period (as character) limited to the year and month, e.g. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
filters |
A vector of filter names (options are: |
plimits |
A two-dimensional vector of thresholds for minimum and maximum price change (it works if one of the chosen filters is |
pquantiles |
A two-dimensional vector of quantile levels for minimum and maximum price change (it works if one of the chosen filters is |
dplimits |
A two-dimensional vector of thresholds for maximum price drop and maximum drop in sales value (it works if one of the chosen filters is |
lambda |
The lambda parameter for |
interval |
A logical value indicating whether the filtering process concerns only two periods defined by |
retailers |
A logical parameter indicating whether filtering should be done for each outlet ( |
This function returns a filtered data set (a reduced user's data frame). If the set of filters
is empty, then the function returns the original data frame (defined by the data
parameter) limited to considered months. On the other hand, if all filters are chosen, i.e. filters=c(extremeprices,dumpprices,lowsales)
, then these filters work independently and a summary result is returned. Please note that both variants of extremeprices
filter can be chosen at the same time, i.e. plimits
and pquantiles
, and they work also independently.
Van Loon, K., Roels, D. (2018) Integrating big data in Belgian CPI. Meeting of the Group of Experts on Consumer Price Indices, Geneva.
data_filtering(milk,start="2018-12",end="2019-03", filters=c("extremeprices"),pquantiles=c(0.01,0.99),interval=TRUE) data_filtering(milk,start="2018-12",end="2019-03", filters=c("extremeprices","lowsales"), plimits=c(0.25,2))
data_filtering(milk,start="2018-12",end="2019-03", filters=c("extremeprices"),pquantiles=c(0.01,0.99),interval=TRUE) data_filtering(milk,start="2018-12",end="2019-03", filters=c("extremeprices","lowsales"), plimits=c(0.25,2))
This function imputes missing prices and (optionally) zero prices by using carry forward/backward prices.
data_imputing(data, start, end, zero_prices = TRUE, outlets = TRUE)
data_imputing(data, start, end, zero_prices = TRUE, outlets = TRUE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
zero_prices |
A logical parameter indicating whether zero prices are to be imputed too (then it is set to TRUE). |
outlets |
A logical parameter indicating whether imputations are to be done for each outlet separately (then it is set to TRUE). |
This function imputes missing prices (unit values) and (optionally) zero prices by using carry forward/backward prices. The imputation can be done for each outlet separately or for aggragated data (see the outlets
parameter). If a missing product has a previous price then that previous price is carried forward until the next real observation. If there is no previous price then the next real observation is found and carried backward. The quantities for imputed prices are set to zeros. The function returns a data frame (monthly aggregated) which is ready for price index calculations.
# Creating a small data set with zero prices: time.<-c("2018-12-01","2019-01-01") time<-as.Date(c(time., time.)) p1<-c(0,23) p2<-c(14,0) q1<-c(15,25) q2<-c(44,79) quantities<-c(q1,q2) prices<-c(p1,p2) prodID<-c(1,1,2,2) my_data<-data.frame(time, prices, quantities, prodID) # Price imputing: data_imputing(my_data, start="2018-12", end="2019-01", zero_prices=TRUE, outlets=FALSE) # Preparing a data set with zero and missing prices: dataMATCH$prodID<-dataMATCH$codeIN data<-dplyr::select(dataMATCH, time, prices, quantities, prodID, retID) set1<-data[1:5,] set1$prices<-0 set2<-data[6:30,] df<-rbind(set1, set2) # Price imputing: data_imputing(df, start="2018-12", end="2019-03", zero_prices=TRUE, outlets=TRUE)
# Creating a small data set with zero prices: time.<-c("2018-12-01","2019-01-01") time<-as.Date(c(time., time.)) p1<-c(0,23) p2<-c(14,0) q1<-c(15,25) q2<-c(44,79) quantities<-c(q1,q2) prices<-c(p1,p2) prodID<-c(1,1,2,2) my_data<-data.frame(time, prices, quantities, prodID) # Price imputing: data_imputing(my_data, start="2018-12", end="2019-01", zero_prices=TRUE, outlets=FALSE) # Preparing a data set with zero and missing prices: dataMATCH$prodID<-dataMATCH$codeIN data<-dplyr::select(dataMATCH, time, prices, quantities, prodID, retID) set1<-data[1:5,] set1$prices<-0 set2<-data[6:30,] df<-rbind(set1, set2) # Price imputing: data_imputing(df, start="2018-12", end="2019-03", zero_prices=TRUE, outlets=TRUE)
This function returns a data set defined in the first parameter (data
) with an additional column (prodID
). Two products are treated as being matched if they have the same prodID
value.
data_matching( data, start, end, interval = FALSE, variables = c(), codeIN = TRUE, codeOUT = TRUE, description = TRUE, onlydescription = FALSE, precision = 0.95 )
data_matching( data, start, end, interval = FALSE, variables = c(), codeIN = TRUE, codeOUT = TRUE, description = TRUE, onlydescription = FALSE, precision = 0.95 )
data |
The user's data frame with information about products to be matched. It must contain columns: |
start |
The base period (as character) limited to the year and month, e.g. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the matching process concerns only two periods defined by |
variables |
The optional parameter describing the vector of additional column names. Values of these additional columns must be identical for matched products. |
codeIN |
A logical value, e.g. if there are retailer (internal) product codes (as numeric or character) written in |
codeOUT |
A logical value, e.g. if there are external product codes, such as GTIN or SKU (as numeric or character) written in |
description |
A logical value, e.g. if there are product labels (as character) written in |
onlydescription |
A logical value indicating whether products with identical labels (described in the |
precision |
A threshold value for the Jaro-Winkler similarity measure when comparing labels (its value must belong to the interval [0,1]). Two labels are treated as similar enough if their Jaro-Winkler similarity exceeds the |
This function returns a data set defined in the first parameter (data
) with an additional column (prodID
). Two products are treated as being matched if they have the same prodID
value. The procedure of generating the above-mentioned additional column depends on the set of chosen columns for matching. In most extreme case, when the onlydescription
parameter value is TRUE, two products are also matched if they have identical descriptions. Other cases are as follows: Case 1
: Parameters codeIN
, codeOUT
and description
are set to TRUE. Products with two identical codes or one of the codes identical and an identical description
are automatically matched. Products are also matched if they have identical one of codes and the Jaro-Winkler similarity of their descriptions is bigger than the precision
value.Case 2
: Only one of the parameters: codeIN
or codeOUT
are set to TRUE and also the description
parameter is set to TRUE. Products with an identical chosen code and an identical description are automatically matched. In the second stage, products are also matched if they have an identical chosen code and the Jaro-Winkler similarity of their descriptions is bigger than the precision
value. Case 3
: Parameters codeIN
and codeOUT
are set to TRUE and the parameter description
is set to FALSE. In this case, products are matched if they have both codes identical. Case 4
: Only the parameter description
is set to TRUE. This case requires the onlydescription
parameter to be TRUE and then the matching process is based only on product labels (two products are matched if they have identical descriptions). Case 5
: Only one of the parameters: codeIN
or codeOUT
are set to TRUE and the description
parameter is set to FALSE. In this case, the only reasonable option is to return the prodID
column which is identical with the chosen code column. Please note that if the set of column names defined in the variables
parameter is not empty, then the values of these additional columns must be identical while product matching.
data_matching(dataMATCH, start="2018-12",end="2019-02",onlydescription=TRUE,interval=TRUE) data_matching(dataMATCH, start="2018-12",end="2019-02",precision=0.98, interval=TRUE)
data_matching(dataMATCH, start="2018-12",end="2019-02",onlydescription=TRUE,interval=TRUE) data_matching(dataMATCH, start="2018-12",end="2019-02",precision=0.98, interval=TRUE)
The function normalizes grammage units of products and recalculates product prices and quantities with respect to these normalized grammage units.
data_norm( data = data.frame(), rules = list(c("ml", "l", 1000), c("g", "kg", 1000)), all = TRUE )
data_norm( data = data.frame(), rules = list(c("ml", "l", 1000), c("g", "kg", 1000)), all = TRUE )
data |
The user's data frame. The data frame must contain the following columns: |
rules |
User rules for transforming |
all |
A logical value indicating whether the resulting data frame is to be limited to products with detected grammage. Its default value is |
The function returns the user's data frame with two transformed columns: grammage
and unit
, and two rescaled columns: prices
and quantities
. The above-mentioned transformation and rescaling take into consideration the user rules
. Recalculated prices and quantities concern grammage units defined as the second parameter in the given rule.
# Preparing a data set data<-data_unit(dataU, units=c("g|ml|kg|l"), multiplication="x") # Normalization of grammage units data_norm(data, rules=list(c("ml","l",1000), c("g","kg",1000)))
# Preparing a data set data<-data_unit(dataU, units=c("g|ml|kg|l"), multiplication="x") # Normalization of grammage units data_norm(data, rules=list(c("ml","l",1000), c("g","kg",1000)))
This function returns a prepared data frame based on the user's data set. The resulting data frame is ready for further data processing (such as data selecting, matching or filtering) and it is also ready for price index calculations (if only it contains required columns).
data_preparing( data, time = NULL, prices = NULL, quantities = NULL, prodID = NULL, retID = NULL, description = NULL, codeIN = NULL, codeOUT = NULL, grammage = NULL, unit = NULL, additional = c(), zero_prices = FALSE, zero_quantities = TRUE )
data_preparing( data, time = NULL, prices = NULL, quantities = NULL, prodID = NULL, retID = NULL, description = NULL, codeIN = NULL, codeOUT = NULL, grammage = NULL, unit = NULL, additional = c(), zero_prices = FALSE, zero_quantities = TRUE )
data |
The user's data frame to be prepared. The user must indicate columns: |
time |
A character name of the column which provides transaction dates. |
prices |
A character name of the column which provides product prices. |
quantities |
A character name of the column which provides product quantities. |
prodID |
A character name of the column which provides product IDs. The |
retID |
A character name of the column which provides outlet IDs (retailer sale points). The |
description |
A character name of the column which provides product descriptions. It is not obligatory to consider this column while data preparing but it is required while product selecting (please see the |
codeIN |
A character name of the column which provides internal product codes (from the retailer). It is not obligatory to consider this column while data preparing but it may be required while product matching (please see the |
codeOUT |
A character name of the column which provides external product codes (e.g. GTIN or SKU). It is not obligatory to consider this column while data preparing but it may be required while product matching (please see the |
grammage |
A character name of the numeric column which provides the grammage of products |
unit |
A character name of the column which provides the unit of the grammage of products |
additional |
A character vector of names of additional columns to be considered while data preparing (records with missing values are deleted). |
zero_prices |
A logical parameter indicating whether zero prices are to be acceptable. |
zero_quantities |
A logical parameter indicating whether zero quantities are to be acceptable. |
The resulting data frame is free from: missing values, negative prices (if zero_prices
is set to TRUE), zero or negative prices (if zero_prices
is set to FALSE), negative quantities (if zero_quantities
is set to TRUE) and zero and negative quantities (if zero_prices
is set to FALSE). As a result, column time
is set to be Date type (in format: 'Year-Month-01'), columns prices
and quantities
are set to be numeric. If the column description
is selected, then it is set to be character type. If columns: prodID
, retID
, codeIN
or codeOUT
are selected, then they are set to be factor type.
data_preparing(milk, time="time",prices="prices",quantities="quantities") data_preparing(dataCOICOP, time="time", prices="prices",quantities="quantities",additional="coicop6")
data_preparing(milk, time="time",prices="prices",quantities="quantities") data_preparing(dataCOICOP, time="time", prices="prices",quantities="quantities",additional="coicop6")
The function returns a reduced data set, i.e. a data set containing sufficiently numerous matched products in the indicated groups. The input data set (data frame) must contain matched products over time, i.e. it must contain the prodID
column (as numeric, factor or character), or product descriptions, i.e. it must contain the description
column (as character).
data_reducing( data, start, end, type = "prodID", minN = 2, outlets = FALSE, by = c(), interval = FALSE )
data_reducing( data, start, end, type = "prodID", minN = 2, outlets = FALSE, by = c(), interval = FALSE )
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
type |
This parameter indicates whether group counts are determined by different matched prodIDs (in which case the parameter has the value 'prodID') or different matched descriptions (in which case the parameter has the value 'description'). |
minN |
This parameter determines the minimum size of matched products in groups. |
outlets |
This parameter determines whether grouping is to be done for each outlet separately. If so (if it is |
by |
This parameter specifies the name of the grouping column (as character). |
interval |
A logical value indicating whether the reducing process concerns only two periods defined by |
The function returns a reduced data set, i.e. a data set containing sufficiently numerous matched products in the indicated groups. For each product group created and for selected periods, the procedure checks that the count of identical prodIDs (or identical product descriptions, which does not necessarily mean the same thing) is at least equal to minN
. If it is not, such products are eliminated from the data set. The function performs the check either only for the base and current period (in which case the interval
parameter is FALSE) or also for all intermediate months (in which case the interval
parameter is TRUE). If the user wants to perform this check for each outlet separately, then the outlets
parameter should be set to TRUE.
data_reducing(sugar, start="2018-12", end="2019-12",by="description", minN=5)
data_reducing(sugar, start="2018-12", end="2019-12",by="description", minN=5)
The function returns a subset of the user's data set obtained by selection based on keywords and phrases.
data_selecting( data, include = c(), must = c(), exclude = c(), sensitivity = FALSE, coicop = NULL )
data_selecting( data, include = c(), must = c(), exclude = c(), sensitivity = FALSE, coicop = NULL )
data |
The user's data frame. It must contain a column |
include |
A vector consisting of words and phrases. The function reduces the data set to one in which the |
must |
A vector consisting of words and phrases. The function reduces the data set to one in which the |
exclude |
A vector consisting of words and phrases. The function reduces the data set to one in which the |
sensitivity |
A logical parameter indicating whether sensitivity to lowercase and uppercase letters is taken into consideration (if yes, its value is TRUE). |
coicop |
An optional parameter indicating a value for an additional column |
The function returns a subset of the user's data set obtained by selection based on keywords and phrases defined by parameters: include
, must
and exclude
(an additional column coicop
is optional). Providing values of these parameters, please remember that the procedure distinguishes between uppercase and lowercase letters only when sensitivity
is set to TRUE.
data_selecting(milk, include=c("milk"), must=c("UHT")) data_selecting(milk, must=c("milk"), exclude=c("paust"))
data_selecting(milk, include=c("milk"), must=c("UHT")) data_selecting(milk, must=c("milk"), exclude=c("paust"))
The function returns the grammage and unit of products as two additional columns.
data_unit(data = data.frame(), units = c("g|ml|kg|l"), multiplication = "x")
data_unit(data = data.frame(), units = c("g|ml|kg|l"), multiplication = "x")
data |
The user's data frame. The data frame must contain the |
units |
Units of products which are to be detected (e.g. "ml|g|kg") |
multiplication |
A sign of the multiplication used in product descriptions (e.g. "x") |
The function returns the user's data frame with two additional columns: grammage
and unit
. The values of these columns are extracted from product descriptions on the basis of provided units
. Please note, that the function takes into consideration a sign of the multiplication, e.g. if the product description contains: '2x50 g', we obtain: grammage: 100
and unit: g
for that product (for multiplication
set to 'x').
data_unit(dataU, units=c("g|ml|kg|l"), multiplication="x")
data_unit(dataU, units=c("g|ml|kg|l"), multiplication="x")
A collection of artificial scanner data on milk products sold in three different months
dataAGGR
dataAGGR
A data frame with 6 columns and 9 rows. The used variables are as follows:
time
- Dates of transactions (Year-Month-Day: 4 different dates)
prices
- Prices of sold products [PLN]
quantities
- Quantities of sold products [l]
prodID
- Retailer product codes (3 prodIDs)
retID
- Unique codes identifying outlets/retailer sale points (4 retIDs)
description
Descriptions of sold products (two subgroups: goat milk, powdered milk)
A collection of real scanner data on the sale of milk products sold in a period: Dec, 2020 - Feb, 2022.
dataCOICOP
dataCOICOP
A data frame with 10 columns and 139600 rows. The used variables are as follows:
time
- Dates of transactions (Year-Month-Day)
prices
- Prices of sold products [PLN]
quantities
- Quantities of sold products
description
- Descriptions of sold products (original: in Polish)
codeIN
- Retailer product codes
retID
- Unique codes identifying outlets/retailer sale points
grammage
- Product grammages
unit
- Sales units, e.g.: kg, ml, etc.
category
- Product categories (in English) corresponding to COICOP 6 levels
coicop6
- Identifiers of local COICOP 6 groups (6 groups)
A collection of scanner data on the sale of sample artificial products.
dataMATCH
dataMATCH
A data frame with 7 columns and 30 rows. The used variables are as follows:
time
- Dates of transactions (Year-Month-Day)
prices
- Prices of sold products [PLN]
quantities
- Quantities of sold products [liters]
codeIN
- Unique internal (retailer) product codes (data set contains 5 different codeINs)
codeOUT
- Unique external product codes (data set contains 5 different codeOUTs)
retID
- Unique codes identifying outlets/retailer sale points (data set contains 2 different retIDs)
description
Descriptions of sold products (data set contains 3 different product descriptions)
A collection of artificial scanner data on 6 products sold in Dec, 2018. Product descriptions contain the information about their grammage and unit.
dataU
dataU
A data frame with 5 columns and 6 rows. The used variables are as follows:
time
- Dates of transactions (Year-Month-Day)
prices
- Prices of sold products [PLN]
quantities
- Quantities of sold products [item]
prodID
- Unique product codes
description
Descriptions of sold products (data set contains 6 different product descriptions)
This function returns a value (or vector of values) of the bilateral Davies price index.
davies(data, start, end, interval = FALSE)
davies(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Davies price index depending on the interval
parameter. 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).
Davies, G. R. (1924). The Problem of a Standard Index Number Formula. Journal of the American Statistical Association, 19 (146), 180-188.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
davies(sugar, start="2018-12", end="2019-12") davies(milk, start="2018-12", end="2020-01", interval=TRUE)
davies(sugar, start="2018-12", end="2019-12") davies(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the unweighted bilateral Dikhanov price index.
dikhanov(data, start, end, interval = FALSE)
dikhanov(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the unweighted bilateral Dikhanov price index depending on the interval
parameter. 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).
Dikhanov, Y., (2024). A New Elementary Index Number. Paper presented at the 18th Meeting of the Ottawa Group on Price Indices, Ottawa, Canada.
dikhanov(sugar, start="2018-12", end="2019-12") dikhanov(milk, start="2018-12", end="2020-01", interval=TRUE)
dikhanov(sugar, start="2018-12", end="2019-12") dikhanov(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value of the relative price and/or quantity dissimilarity measure.
dissimilarity(data, period1, period2, type = "p")
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")
dissimilarity(milk, period1="2018-12",period2="2019-12",type="q") dissimilarity(milk, period1="2018-12",period2="2019-12",type="pq")
This function presents values of the relative price and/or quantity dissimilarity measure over time.
dissimilarity_fig( data, start, end, type = "p", benchmark = "end", figure = TRUE, date_breaks = "1 month" )
dissimilarity_fig( data, start, end, type = "p", benchmark = "end", figure = TRUE, date_breaks = "1 month" )
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". |
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).
Diewert, E. (2020). The Chain Drift Problem and Multilateral Indexes. Chapter 6 in: Consumer Price Index Theory (draft)
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")
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")
This function returns a value (or vector of values) of the bilateral Drobisch price index.
drobisch(data, start, end, interval = FALSE)
drobisch(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Drobisch price index depending on the interval
parameter. 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).
Drobisch, M. W. (1871). Ueber einige Einwurfe gegen die in diesen Jahrbuchern veroffentlichte neue Methode, die Veranderungen der Waarenpreise und des Geldwerths zu berechten.Jahrbucher fur Nationalokonomie und Statistik, Vol. 16, s. 416-427.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
drobisch(sugar, start="2018-12", end="2019-12") drobisch(milk, start="2018-12", end="2020-01", interval=TRUE)
drobisch(sugar, start="2018-12", end="2019-12") drobisch(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the unweighted bilateral Dutot price index.
dutot(data, start, end, interval = FALSE)
dutot(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the unweighted bilateral Dutot price index depending on the interval
parameter. 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).
Dutot, C. F., (1738). Reflexions Politiques sur les Finances et le Commerce. The Hague: Les Freres Vaillant et Nicolas Prevost, Vol. 1.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
dutot(sugar, start="2018-12", end="2019-12") dutot(milk, start="2018-12", end="2020-01", interval=TRUE)
dutot(sugar, start="2018-12", end="2019-12") dutot(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value of the elasticity of substitution
elasticity( data, start, end, method = "lm", left = -10, right = 10, precision = 1e-06 )
elasticity( data, start, end, method = "lm", left = -10, right = 10, precision = 1e-06 )
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
method |
The index formula for which the CES index will be equated to calculate the elasticity. Acceptable options are |
left |
The beginning of an interval for estimation of the elasticity of substitution (its default value is -10). |
right |
The end of an interval for estimation of the elasticity of substitution (its default value is 10). |
precision |
The precision of estimation (a 'stop' condition for the procedure). A default value of this parameter is 0.000001. |
This function returns a value of the elasticity of substitution. If the method
parameter is set to lm
, the procedure of estimation solves the equation: LM(sigma)-CW(sigma)=0 numerically, where LM denotes the Lloyd-Moulton price index, the CW denotes a current weight counterpart of the Lloyd-Moulton price index, and sigma is the elasticity of substitution parameter, which is estimated. If the method
parameter is set to f
, the Fisher price index formula is used instead of the CW price index. If the method
parameter is set to t
, the Tornqvist price index formula is used instead of the CW price index. If the method
parameter is set to w
, the Walsh price index formula is used instead of the CW price index. If the method
parameter is set to sv
, the Sato-Vartia price index formula is used instead of the CW price index.The procedure continues until the absolute value of this difference is greater than the value of the 'precision' parameter.
de Haan, J., Balk, B.M., Hansen, C.B. (2010). Retrospective Approximations of Superlative Price Indexes for Years Where Expenditure Data Is Unavailable. In: Biggeri, L., Ferrari, G. (eds) Price Indexes in Time and Space. Contributions to Statistics. Physica-Verlag HD.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
elasticity(coffee, start = "2018-12", end = "2019-01") elasticity(coffee, start = "2018-12", end = "2019-01", method = "f") elasticity(coffee, start = "2018-12", end = "2019-01", method = "sv")
elasticity(coffee, start = "2018-12", end = "2019-01") elasticity(coffee, start = "2018-12", end = "2019-01", method = "f") elasticity(coffee, start = "2018-12", end = "2019-01", method = "sv")
The function provides a data frame or a figure presenting elasticities of substitution calculated for time interval.
elasticity_fig( data, start, end, method = c("lm"), fixedbase = TRUE, figure = TRUE, date_breaks = "1 month", names = c(), left = -10, right = 10, precision = 1e-06 )
elasticity_fig( data, start, end, method = c("lm"), fixedbase = TRUE, figure = TRUE, date_breaks = "1 month", names = c(), left = -10, right = 10, precision = 1e-06 )
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
method |
A vector indicating index formulas for which the CES index will be equated to calculate the elasticity. Acceptable options are |
fixedbase |
A logical parameter indicating whether the procedure is to work for subsequent months from the considered time interval ( |
figure |
A logical parameter indicating whether the function returns a figure (TRUE) or a data frame (FALSE) with values of elasticity of substitution. |
date_breaks |
A string giving the distance between breaks on the X axis like "1 month" (default value) or "4 months". |
names |
A character string indicating names of indices used for elasticity approximation (see the |
left |
The beginning of an interval for estimation of each elasticity of substitution (its default value is -10) |
right |
The end of an interval for estimation of each elasticity of substitution (its default value is 10) |
precision |
The precision of estimation (a 'stop' condition for the procedure). A default value of this parameter is 0.000001. |
The function provides a data frame or a figure presenting elasticities of substitution calculated for time interval (see the figure
parameter). The elasticities of substitution can be calculated for subsequent months or for a fixed base month (see the start
parameter) and rest of months from the given time interval (it depends on the fixedbase
parameter). The above-mentioned parameters for compared months are calculated by using the elasticity
function.
de Haan, J., Balk, B.M., Hansen, C.B. (2010). Retrospective Approximations of Superlative Price Indexes for Years Where Expenditure Data Is Unavailable. In: Biggeri, L., Ferrari, G. (eds) Price Indexes in Time and Space. Contributions to Statistics. Physica-Verlag HD.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
elasticity_fig (milk,start="2018-12",end="2019-04",figure=TRUE, method=c("lm","f"),names=c("LM","Fisher")) elasticity_fig (milk,start="2018-12",end="2019-06",figure=FALSE)
elasticity_fig (milk,start="2018-12",end="2019-04",figure=TRUE, method=c("lm","f"),names=c("LM","Fisher")) elasticity_fig (milk,start="2018-12",end="2019-06",figure=FALSE)
The function returns expenditures of sold products with given IDs.
expenditures(data, period, set = c(), ID = FALSE)
expenditures(data, period, set = c(), ID = FALSE)
data |
The user's data frame. It must contain columns: |
period |
The time period (as character) limited to the year and month, e.g. "2019-03". |
set |
The set of unique product IDs to be used for determining expenditures of sold products (see also |
ID |
A logical parameter indicating whether a data frame with prodIDs and quantities should be returned. |
The function analyzes the user's data frame and returns expenditures of products with given ID
and being sold in the time period indicated by the period
parameter. Please note that the function returns the expenditure values for sorted prodIDs and in the absence of a given prodID in the data set, the function returns nothing (it does not return zero). If the ID parameter is set to TRUE then the function returns a data frame with columns: by
(IDs of products) and expend
(expenditures of products).
expenditures(milk, period="2019-06") expenditures(milk, period="2019-12", set=c(400032, 82919), ID=TRUE)
expenditures(milk, period="2019-06") expenditures(milk, period="2019-12", set=c(400032, 82919), ID=TRUE)
This function returns a value (or values) of the selected final price index for the selected type of aggregation of partial results.
final_index( data = data.frame(), start = c(), end = c(), formula = c(), window = c(), splice = c(), base = c(), sigma = c(), r = c(), outlets = FALSE, groups = FALSE, by = c(), aggr = "fisher", interval = FALSE )
final_index( data = data.frame(), start = c(), end = c(), formula = c(), window = c(), splice = c(), base = c(), sigma = c(), r = c(), outlets = FALSE, groups = FALSE, by = c(), aggr = "fisher", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
formula |
The character string indicating the price index formula is to be calculated. To see available options please use the link: |
window |
The length of the time window if the multilateral index is selected (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method (if the multilateral splicing index is selected). Available options are: "movement", "window","half","mean" and their additional variants: "window_published", "half_published" and "mean_published". |
base |
The prior period used in the Young- or Lowe-type price indices (as character) limited to the year and month, e.g. "2020-01". |
sigma |
The elasticity of substitution parameter used in the Lloyed-Moulton, AG Mean or GEKS-LM indices (as numeric). |
r |
The non-zero parameter used in the quadratic mean of order r quantity / price index or in the GEKS-QM index (as numeric). |
outlets |
A logical parameter indicating whether the aggregation over outlets (defined by |
groups |
A logical parameter indicating whether the aggregation over product subgroups (indicated by 'by' parameter) should be done. |
by |
A character string which indicates a column name for creating product subgroups. |
aggr |
The formula used for aggregating partial index results (available values are: "arithmetic", "geometric", "laspeyres", "paasche", "fisher", "tornqvist"). |
interval |
A logical value indicating whether the function is to provide price indices comparing the research period defined by |
This general function returns a value or values of the selected final price index for the selected type of aggregation of partial results. If the interval
parameter is set to TRUE, then it returns a data frame where its first column indicates dates and the remaining columns show corresponding values of all selected price indices.
final_index(coffee, start = "2018-12", end = "2019-12", formula = "fisher", groups = TRUE, outlets = FALSE, aggr = "tornqvist", by = "description") final_index(milk, start = "2018-12", end = "2019-12", formula = "fisher", groups = TRUE, outlets = TRUE, aggr = "laspeyres", by = "description", interval = TRUE)
final_index(coffee, start = "2018-12", end = "2019-12", formula = "fisher", groups = TRUE, outlets = FALSE, aggr = "tornqvist", by = "description") final_index(milk, start = "2018-12", end = "2019-12", formula = "fisher", groups = TRUE, outlets = TRUE, aggr = "laspeyres", by = "description", interval = TRUE)
This function returns a value (or vector of values) of the bilateral Fisher price index.
fisher(data, start, end, interval = FALSE)
fisher(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Fisher price index depending on the interval
parameter. 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).
Fisher, I. (1922). The Making of Index Numbers. Boston: Houghton Mifflin.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
fisher(sugar, start="2018-12", end="2019-12") fisher(milk, start="2018-12", end="2020-01", interval=TRUE)
fisher(sugar, start="2018-12", end="2019-12") fisher(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral Geary-Khamis price index.
geary_khamis(data, start, end, interval = FALSE)
geary_khamis(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Geary-Khamis price index depending on the interval
parameter (please use gk
function to calculate the multilateral Geary-Khamis price index). 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).
Geary, R. G. (1958). A Note on Comparisons of Exchange Rates and Purchasing Power between Countries. Journal of the Royal Statistical Society, Series A, 121, 97-99.
Khamis, S. H. (1970). Properties and Conditions for the Existence of a new Type of Index Number. Sankhya Series B32, 81-98.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
geary_khamis(sugar, start="2018-12", end="2019-12") geary_khamis(milk, start="2018-12", end="2020-01", interval=TRUE)
geary_khamis(sugar, start="2018-12", end="2019-12") geary_khamis(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value of the multilateral GEKS price index (to be more precise: the GEKS index based on the Fisher formula).
geks(data, start, end, wstart = start, window = 13)
geks(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS price index (to be more precise: the GEKS index based on the Fisher formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
geks(milk, start="2019-01", end="2019-08",window=10) geks(milk, start="2018-12", end="2019-12")
geks(milk, start="2019-01", end="2019-08",window=10) geks(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral GEKS price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
geks_fbew(data, start, end)
geks_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
geks_fbew(milk, start="2018-12", end="2019-08")
geks_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral GEKS price index extended by using the FBMW (Fixed Base Moving Window) method.
geks_fbmw(data, start, end)
geks_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS price index extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
geks_fbmw(milk, start="2019-12", end="2020-04")
geks_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral GEKS price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
geks_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
geks_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
geks_splice(milk, start="2018-12", end="2020-02",splice="half")
geks_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral GEKS-AQI price index (to be more precise: the GEKS index based on the asynchronous quality adjusted price index formula).
geksaqi(data, start, end, wstart = start, window = 13)
geksaqi(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS-AQI price index (to be more precise: the GEKS index based on the asynchronous quality adjusted price index formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
geksaqi(milk, start="2019-01", end="2019-08",window=10) geksaqi(milk, start="2018-12", end="2019-12")
geksaqi(milk, start="2019-01", end="2019-08",window=10) geksaqi(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral GEKS-AQI price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
geksaqi_fbew(data, start, end)
geksaqi_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-AQI price index (the GEKS index based on the asynchronous quality adjusted price index formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
geksaqi_fbew(milk, start="2018-12", end="2019-08")
geksaqi_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral GEKS-AQI price index extended by using the FBMW (Fixed Base Moving Window) method.
geksaqi_fbmw(data, start, end)
geksaqi_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-AQI price index (the GEKS index based on the asynchronous quality adjusted price index formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
geksaqi_fbmw(milk, start="2019-12", end="2020-04")
geksaqi_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral GEKS-AQI price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
geksaqi_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
geksaqi_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean","window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS-AQI price index (the GEKS index based on the asynchronous quality adjusted price index formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
geksaqi_splice(milk, start="2018-12", end="2020-02",splice="half")
geksaqi_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral GEKS-AQU price index (to be more precise: the GEKS index based on the asynchronous quality adjusted unit value formula).
geksaqu(data, start, end, wstart = start, window = 13)
geksaqu(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS-AQU price index (to be more precise: the GEKS index based on the asynchronous quality adjusted unit value formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
geksaqu(milk, start="2019-01", end="2019-08",window=10) geksaqu(milk, start="2018-12", end="2019-12")
geksaqu(milk, start="2019-01", end="2019-08",window=10) geksaqu(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral GEKS-AQU price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
geksaqu_fbew(data, start, end)
geksaqu_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-AQU price index (the GEKS index based on the asynchronous quality adjusted unit value formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
geksaqu_fbew(milk, start="2018-12", end="2019-08")
geksaqu_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral GEKS-AQU price index extended by using the FBMW (Fixed Base Moving Window) method.
geksaqu_fbmw(data, start, end)
geksaqu_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-AQU price index (the GEKS index based on the asynchronous quality adjusted unit value formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
geksaqu_fbmw(milk, start="2019-12", end="2020-04")
geksaqu_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral GEKS-AQU price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
geksaqu_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
geksaqu_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean","window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS-AQU price index (the GEKS index based on the asynchronous quality adjusted unit value formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
geksaqu_splice(milk, start="2018-12", end="2020-02",splice="half")
geksaqu_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral GEKS-GAQI price index (to be more precise: the GEKS index based on the geometric asynchronous quality adjusted price index formula).
geksgaqi(data, start, end, wstart = start, window = 13)
geksgaqi(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS-GAQI price index (to be more precise: the GEKS index based on the geometric asynchronous quality adjusted price index formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
geksgaqi(milk, start="2019-01", end="2019-08",window=10) geksgaqi(milk, start="2018-12", end="2019-12")
geksgaqi(milk, start="2019-01", end="2019-08",window=10) geksgaqi(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral GEKS-GAQI price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
geksgaqi_fbew(data, start, end)
geksgaqi_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-GAQI price index (the GEKS index based on the geometric asynchronous quality adjusted price index formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
geksgaqi_fbew(milk, start="2018-12", end="2019-08")
geksgaqi_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral GEKS-GAQI price index extended by using the FBMW (Fixed Base Moving Window) method.
geksgaqi_fbmw(data, start, end)
geksgaqi_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-GAQI price index (the GEKS index based on the geometric asynchronous quality adjusted price index formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
geksgaqi_fbmw(milk, start="2019-12", end="2020-04")
geksgaqi_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral GEKS-GAQI price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
geksgaqi_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
geksgaqi_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean","window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS-GAQI price index (the GEKS index based on the geometric asynchronous quality adjusted price index formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
geksgaqi_splice(milk, start="2018-12", end="2020-01",window=10)
geksgaqi_splice(milk, start="2018-12", end="2020-01",window=10)
This function returns a value of the multilateral GEKS-GL price index (to be more precise: the GEKS index based on the geometric Laspeyres formula).
geksgl(data, start, end, wstart = start, window = 13)
geksgl(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS-GL price index (to be more precise: the GEKS index based on the geometric Laspeyres formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
geksgl(milk, start="2019-01", end="2019-08",window=10) geksgl(milk, start="2018-12", end="2019-12")
geksgl(milk, start="2019-01", end="2019-08",window=10) geksgl(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral GEKS-GL price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
geksgl_fbew(data, start, end)
geksgl_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-GL price index (the GEKS index based on the geometric Laspeyres formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
geksgl_fbew(milk, start="2018-12", end="2019-08")
geksgl_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral GEKS-GL price index extended by using the FBMW (Fixed Base Moving Window) method.
geksgl_fbmw(data, start, end)
geksgl_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-GL price index (the GEKS index based on the geometric Laspeyres formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
geksgl_fbmw(milk, start="2019-12", end="2020-04")
geksgl_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral GEKS-GL price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
geksgl_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
geksgl_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS-GL price index (the GEKS index based on the geometric Laspeyres formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
geksgl_splice(milk, start="2018-12", end="2020-02",splice="half")
geksgl_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral GEKS-IQM price index (to be more precise: the GEKS index based on the implicit quadratic mean of order r price index IQMp).
geksiqm(data, start, end, r = 2, wstart = start, window = 13)
geksiqm(data, start, end, r = 2, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter used in the implicit quadratic mean of order r price index. |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS-IQM price index (to be more precise: the GEKS index based on the the implicit quadratic mean of order r price index IQMp) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
geksiqm(milk, start="2019-01", end="2019-08",window=10) geksiqm(milk, start="2018-12", end="2019-12", r=1.6)
geksiqm(milk, start="2019-01", end="2019-08",window=10) geksiqm(milk, start="2018-12", end="2019-12", r=1.6)
This function returns a value of the multilateral GEKS-IQM price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
geksiqm_fbew(data, start, end, r)
geksiqm_fbew(data, start, end, r)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter used in the implicit quadratic mean of order r price index. |
This function returns a value of the multilateral GEKS-IQM price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
geksiqm_fbew(milk, start="2018-12", end="2019-08", r=1.2)
geksiqm_fbew(milk, start="2018-12", end="2019-08", r=1.2)
This function returns a value of the multilateral GEKS-IQM price index extended by using the FBMW (Fixed Base Moving Window) method.
geksiqm_fbmw(data, start, end, r)
geksiqm_fbmw(data, start, end, r)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter used in the implicit quadratic mean of order r price index. |
This function returns a value of the multilateral GEKS-IQM price index extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
geksiqm_fbmw(milk, start="2019-12", end="2020-04", r=1.6)
geksiqm_fbmw(milk, start="2019-12", end="2020-04", r=1.6)
This function returns a value (or values) of the multilateral GEKS-IQM price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
geksiqm_splice( data, start, end, r = 2, window = 13, splice = "movement", interval = FALSE )
geksiqm_splice( data, start, end, r = 2, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter used in the implicit quadratic mean of order r price index. |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS-IQM price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
geksiqm_splice(milk, start="2018-12", end="2020-02", r=0.8, splice="half")
geksiqm_splice(milk, start="2018-12", end="2020-02", r=0.8, splice="half")
This function returns a value of the multilateral GEKS-J price index (to be more precise: the GEKS index based on the Jevons formula).
geksj(data, start, end, wstart = start, window = 13)
geksj(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS-J price index (to be more precise: the GEKS index based on the Jevons formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
geksj(milk, start="2019-01", end="2019-08",window=10) geksj(milk, start="2018-12", end="2019-12")
geksj(milk, start="2019-01", end="2019-08",window=10) geksj(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral GEKS-J price index (i.e. the GEKS price index based on the Jevons formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
geksj_fbew(data, start, end)
geksj_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-J price index (i.e. the GEKS price index based on the Jevons formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
geksj_fbew(milk, start="2018-12", end="2019-08")
geksj_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral GEKS-J price index (i.e. the GEKS price index based on the Jevons formula) extended by using the FBMW (Fixed Base Moving Window) method.
geksj_fbmw(data, start, end)
geksj_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-J price index (i.e. the GEKS price index based on the Jevons formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
geksj_fbmw(milk, start="2019-12", end="2020-04")
geksj_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral GEKS-J price index (GEKS based on the Jevons formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
geksj_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
geksj_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS-J price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
geksj_splice(milk, start="2018-12", end="2020-02",splice="half")
geksj_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral GEKS-L price index (to be more precise: the GEKS index based on the Laspeyres formula).
geksl(data, start, end, wstart = start, window = 13)
geksl(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS-L price index (to be more precise: the GEKS index based on the Laspeyres formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
geksl(milk, start="2019-01", end="2019-08",window=10) geksl(milk, start="2018-12", end="2019-12")
geksl(milk, start="2019-01", end="2019-08",window=10) geksl(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral GEKS-L price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
geksl_fbew(data, start, end)
geksl_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-L price index (the GEKS index based on the Laspeyres formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
geksl_fbew(milk, start="2018-12", end="2019-08")
geksl_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral GEKS-L price index extended by using the FBMW (Fixed Base Moving Window) method.
geksl_fbmw(data, start, end)
geksl_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-L price index (the GEKS index based on the Laspeyres formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
geksl_fbmw(milk, start="2019-12", end="2020-04")
geksl_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral GEKS-L price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
geksl_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
geksl_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS-L price index (the GEKS index based on the Laspeyres formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
geksl_splice(milk, start="2018-12", end="2020-02",splice="half")
geksl_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral GEKS-LM price index (to be more precise: the GEKS index based on the Lloyd-Moulton price index).
gekslm(data, start, end, sigma = 0.7, wstart = start, window = 13)
gekslm(data, start, end, sigma = 0.7, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
sigma |
The elasticity of substitution (a parameter used in the Lloyd-Moulton index formula). |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS-LM price index (to be more precise: the GEKS index based on the Lloyd-Moulton price index) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lloyd, P. J. (1975). Substitution Effects and Biases in Nontrue Price Indices. The American Economic Review, 65, 301-313.
Moulton, B. R. (1996). Constant Elasticity Cost-of-Living Index in Share-Relative Form. Washington DC: U. S. Bureau of Labor Statistics, mimeograph
gekslm(milk, start="2019-01", end="2019-08",window=10) gekslm(milk, start="2018-12", end="2019-12", sigma=0.5)
gekslm(milk, start="2019-01", end="2019-08",window=10) gekslm(milk, start="2018-12", end="2019-12", sigma=0.5)
This function returns a value of the multilateral GEKS-LM price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
gekslm_fbew(data, start, end, sigma)
gekslm_fbew(data, start, end, sigma)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
sigma |
The elasticity of substitution (a parameter used in the Lloyd-Moulton index formula).. |
This function returns a value of the multilateral GEKS-LM price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
gekslm_fbew(milk, start="2018-12", end="2019-08", sigma=1.2)
gekslm_fbew(milk, start="2018-12", end="2019-08", sigma=1.2)
This function returns a value of the multilateral GEKS-LM price index extended by using the FBMW (Fixed Base Moving Window) method.
gekslm_fbmw(data, start, end, sigma)
gekslm_fbmw(data, start, end, sigma)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
sigma |
The elasticity of substitution (a parameter used in the Lloyd-Moulton index formula). |
This function returns a value of the multilateral GEKS-LM price index extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
geksqm_fbmw(milk, start="2019-12", end="2020-04", r=1.6)
geksqm_fbmw(milk, start="2019-12", end="2020-04", r=1.6)
This function returns a value (or values) of the multilateral GEKS-LM price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
gekslm_splice( data, start, end, sigma = 0.7, window = 13, splice = "movement", interval = FALSE )
gekslm_splice( data, start, end, sigma = 0.7, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
sigma |
The elasticity of substitution (a parameter used in the Lloyd-Moulton index formula). |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS-LM price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
gekslm_splice(milk, start="2018-12", end="2020-02", sigma=0.8, splice="half")
gekslm_splice(milk, start="2018-12", end="2020-02", sigma=0.8, splice="half")
This function returns a value of the multilateral GEKS-QM price index (to be more precise: the GEKS index based on the quadratic mean of order r price index QMp).
geksqm(data, start, end, r = 2, wstart = start, window = 13)
geksqm(data, start, end, r = 2, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter used in the implicit quadratic mean of order r price index. |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS-QM price index (to be more precise: the GEKS index based on the the quadratic mean of order r price index QMp) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
geksqm(milk, start="2019-01", end="2019-08",window=10) geksqm(milk, start="2018-12", end="2019-12", r=1.6)
geksqm(milk, start="2019-01", end="2019-08",window=10) geksqm(milk, start="2018-12", end="2019-12", r=1.6)
This function returns a value of the multilateral GEKS-QM price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
geksqm_fbew(data, start, end, r)
geksqm_fbew(data, start, end, r)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter used in the implicit quadratic mean of order r price index. |
This function returns a value of the multilateral GEKS-QM price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
geksqm_fbew(milk, start="2018-12", end="2019-08", r=1.2)
geksqm_fbew(milk, start="2018-12", end="2019-08", r=1.2)
This function returns a value of the multilateral GEKS-QM price index extended by using the FBMW (Fixed Base Moving Window) method.
geksqm_fbmw(data, start, end, r)
geksqm_fbmw(data, start, end, r)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter used in the implicit quadratic mean of order r price index. |
This function returns a value of the multilateral GEKS-QM price index extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
geksqm_fbmw(milk, start="2019-12", end="2020-04", r=1.6)
geksqm_fbmw(milk, start="2019-12", end="2020-04", r=1.6)
This function returns a value (or values) of the multilateral GEKS-QM price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
geksqm_splice( data, start, end, r = 2, window = 13, splice = "movement", interval = FALSE )
geksqm_splice( data, start, end, r = 2, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter used in the implicit quadratic mean of order r price index. |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS-QM price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
geksqm_splice(milk, start="2018-12", end="2020-02", r=0.8, splice="half")
geksqm_splice(milk, start="2018-12", end="2020-02", r=0.8, splice="half")
This function returns a value of the multilateral GEKS-W price index, i.e. the GEKS price index based on the superlative Walsh index formula.
geksw(data, start, end, wstart = start, window = 13)
geksw(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral GEKS-W price index (to be more precise: the GEKS index based on the Walsh formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Walsh, C. M. (1901). The Measurement of General Exchange Value. The MacMillan Company, New York.
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
geksw(milk, start="2019-01", end="2019-08",window=10) geksw(milk, start="2018-12", end="2019-12")
geksw(milk, start="2019-01", end="2019-08",window=10) geksw(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral GEKS-W price index (GEKS based on the Walsh formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
geksw_fbew(data, start, end)
geksw_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-W price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Walsh, C. M. (1901). The Measurement of General Exchange Value. The MacMillan Company, New York.
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
geksw_fbew(milk, start="2018-12", end="2019-08")
geksw_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral GEKS-W price index (GEKS based on the Walsh formula) extended by using the FBMW (Fixed Base Moving Window) method.
geksw_fbmw(data, start, end)
geksw_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral GEKS-W price index extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Walsh, C. M. (1901). The Measurement of General Exchange Value. The MacMillan Company, New York.
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
geksw_fbmw(milk, start="2019-12", end="2020-04")
geksw_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral GEKS-W price index (GEKS based on the Walsh formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
geksw_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
geksw_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral GEKS-W price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
geksw_splice(milk, start="2018-12", end="2020-02",splice="half")
geksw_splice(milk, start="2018-12", end="2020-02",splice="half")
This function provides artificial scanner datasets where prices and quantities are lognormally distributed.
generate( pmi = c(), psigma = c(), qmi = c(), qsigma = c(), prec = c(2, 0), n = 100, n0 = 1, r = 1, r0 = 1, start, days = FALSE )
generate( pmi = c(), psigma = c(), qmi = c(), qsigma = c(), prec = c(2, 0), n = 100, n0 = 1, r = 1, r0 = 1, start, days = FALSE )
pmi |
A numeric vector indicating |
psigma |
A numeric vector indicating |
qmi |
A numeric vector indicating |
qsigma |
A numeric vector indicating |
prec |
A two-dimensional numeric vector indicating precision, i.e. the number of decimal places, for presenting prices and quantities. |
n |
An integer parameter indicating the number of products which are to be generated. |
n0 |
An integer parameter indicating the first (the smallest) prodID. |
r |
An integer parameter indicating the number of outlets (retailer sale points) for which prices and quantities are to be generated. |
r0 |
n0 An integer parameter indicating the first (the smallest) retID. |
start |
The first period in the generated data frame (as character) limited to the year and month, e.g. '2019-12'. |
days |
A logical parameter indicating whether the trading day in a given month is to be randomised. The default value of |
This function returns an artificial scanner dataset where prices and quantities are lognormally distributed. The characteristics for these lognormal distributions are set by pmi
, psigma
, qmi
and qsigma
parameters. This function works for a fixed number of products and outlets (see n
and r
parameters). The generated dataset is ready for further price index calculations.
Sulewski, P., Białek, J. (2022). Probability Distribution Modelling of Scanner Prices and Relative Prices. Statistika – Statistics and Economy Journal, Vol. 3/2022, 282-298, Czech Statistical Office, Prague.
generate(pmi=c(1.02,1.03,1.04),psigma=c(0.05,0.09,0.02),qmi=c(3,4,4), qsigma=c(0.1,0.1,0.15),start="2020-01",days=TRUE) generate(pmi=c(1.02,1.03,1.04),psigma=c(0.05,0.09,0.02),qmi=c(6,6,7), qsigma=c(0.1,0.1,0.15),start="2020-01",n=1000,n0=132578,r=10)
generate(pmi=c(1.02,1.03,1.04),psigma=c(0.05,0.09,0.02),qmi=c(3,4,4), qsigma=c(0.1,0.1,0.15),start="2020-01",days=TRUE) generate(pmi=c(1.02,1.03,1.04),psigma=c(0.05,0.09,0.02),qmi=c(6,6,7), qsigma=c(0.1,0.1,0.15),start="2020-01",n=1000,n0=132578,r=10)
This function provides artificial scanner datasets where prices are lognormally distributed and quantities are obtained under a CES utility.
generate_CES( pmi = c(), psigma = c(), prec = 2, elasticity = 0.7, S = 1000, alfa = c(), n = 100, n0 = 1, r = 1, r0 = 1, start, days = FALSE )
generate_CES( pmi = c(), psigma = c(), prec = 2, elasticity = 0.7, S = 1000, alfa = c(), n = 100, n0 = 1, r = 1, r0 = 1, start, days = FALSE )
pmi |
A numeric vector indicating |
psigma |
A numeric vector indicating |
prec |
A numeric value indicating precision, i.e. the number of decimal places, for generating prices. |
elasticity |
The elasticity of substitution. The default value is 0.7. |
S |
Sum of spending. The default value is 1000. |
alfa |
A numeric vector indicating positive weights that reflect the consumer preferences.By default, this vector is randomized based on a uniform distribution. |
n |
An integer parameter indicating the number of products which are to be generated. |
n0 |
An integer parameter indicating the first (the smallest) prodID. |
r |
An integer parameter indicating the number of outlets (retailer sale points) for which prices and quantities are to be generated. |
r0 |
n0 An integer parameter indicating the first (the smallest) retID. |
start |
The first period in the generated data frame (as character) limited to the year and month, e.g. '2019-12'. |
days |
A logical parameter indicating whether the trading day in a given month is to be randomised. The default value of |
This function returns an artificial scanner dataset where prices are lognormally distributed, quantities are calculated under the assumption that consumers have CES (Constant Elasticity of Substitution) preferences and their spending on all products is S
. The characteristics for the lognormal price distribution are set by pmi
and psigma
parameters. This function works for a fixed number of products and outlets (see n
and r
parameters). The generated dataset is ready for further price index calculations.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
#Generating an artificial dataset (the elasticity of substitution is 1.25) df<-generate_CES(pmi=c(1.02,1.03),psigma=c(0.04,0.03), elasticity=1.25,start="2020-01",n=100,days=TRUE) #Verifying the elasticity of substitution elasticity(df, start="2020-01",end="2020-02")
#Generating an artificial dataset (the elasticity of substitution is 1.25) df<-generate_CES(pmi=c(1.02,1.03),psigma=c(0.04,0.03), elasticity=1.25,start="2020-01",n=100,days=TRUE) #Verifying the elasticity of substitution elasticity(df, start="2020-01",end="2020-02")
This function returns a value (or vector of values) of the bilateral geohybrid price index. The geohybrid index was proposed by Bialek (2020) and it uses correlation coefficients between prices and quantities.
geohybrid(data, start, end, base = start, interval = FALSE)
geohybrid(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the geohybrid price index formula (as character) limited to the year and month, e.g. "2020-01" |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral geohybrid price index depending on the interval
parameter. 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).
Bialek, J. (2020). Proposition of a Hybrid Price Index Formula for the Consumer Price Index Measurement. Equilibrium. Quarterly Journal of Economics and Economic Policy, 15(4), 697-716.
geohybrid(sugar, start="2019-12", end="2020-08", base="2018-12") geohybrid(milk, start="2019-12", end="2020-08", base="2018-12", interval=TRUE)
geohybrid(sugar, start="2019-12", end="2020-08", base="2018-12") geohybrid(milk, start="2019-12", end="2020-08", base="2018-12", interval=TRUE)
This function returns a value (or vector of values) of the bilateral geo-logarithmic Laspeyres price index.
geolaspeyres(data, start, end, interval = FALSE)
geolaspeyres(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral geo-logarithmic Laspeyres price index depending on the interval
parameter. 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).
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
geolaspeyres(sugar, start="2018-12", end="2019-12") geolaspeyres(milk, start="2018-12", end="2020-01", interval=TRUE)
geolaspeyres(sugar, start="2018-12", end="2019-12") geolaspeyres(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral geometric Lowe price index.
geolowe(data, start, end, base = start, interval = FALSE)
geolowe(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the geometric Lowe price index formula (as character) limited to the year and month, e.g. "2020-01" |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral geometric Lowe price index depending on the interval
parameter. 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).
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
geolowe(sugar, start="2019-01", end="2020-01",base="2018-12") geolowe(milk, start="2018-12", end="2020-01", interval=TRUE)
geolowe(sugar, start="2019-01", end="2020-01",base="2018-12") geolowe(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral geo-logarithmic Paasche price index.
geopaasche(data, start, end, interval = FALSE)
geopaasche(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral geo-logarithmic Paasche price index depending on the interval
parameter. 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).
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
geopaasche(sugar, start="2018-12", end="2019-12") geopaasche(milk, start="2018-12", end="2020-01", interval=TRUE)
geopaasche(sugar, start="2018-12", end="2019-12") geopaasche(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral geometric Young price index.
geoyoung(data, start, end, base = start, interval = FALSE)
geoyoung(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the geometric Young price index formula (as character) limited to the year and month, e.g. "2020-01" |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral geometric Young price index depending on the interval
parameter. 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).
Young, A. H. (1992). Alternative Measures of Change in Real Output and Prices. Survey of Current Business, 72, 32-48.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
geoyoung(sugar, start="2019-01", end="2020-01",base="2018-12") geoyoung(milk, start="2018-12", end="2020-01", interval=TRUE)
geoyoung(sugar, start="2019-01", end="2020-01",base="2018-12") geoyoung(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value of the multilateral Geary-Khamis price index.
gk(data, start, end, wstart = start, window = 13)
gk(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral Geary-Khamis price index which considers the time window defined by wstart
and window
parameters. The Geary-Khamis price index is calculated by using a special iterative algorithm from Chessa (2016)
. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Geary, R. G. (1958). A Note on Comparisons of Exchange Rates and Purchasing Power between Countries. Journal of the Royal Statistical Society, Series A, 121, 97-99.
Khamis, S. H. (1970). Properties and Conditions for the Existence of a new Type of Index Number. Sankhya Series B32, 81-98.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
gk(milk, start="2019-01", end="2019-08",window=10) gk(milk, start="2018-12", end="2019-12")
gk(milk, start="2019-01", end="2019-08",window=10) gk(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral Geary-Khamis price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
gk_fbew(data, start, end)
gk_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral Geary-Khamis price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Geary, R. G. (1958). A Note on Comparisons of Exchange Rates and Purchasing Power between Countries. Journal of the Royal Statistical Society, Series A, 121, 97-99.
Khamis, S. H. (1970). Properties and Conditions for the Existence of a new Type of Index Number. Sankhya Series B32, 81-98.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
gk_fbew(milk, start="2018-12", end="2019-08")
gk_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral Geary-Khamis price index extended by using the FBMW (Fixed Base Moving Window) method.
gk_fbmw(data, start, end)
gk_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral Geary-Khamis price index extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Geary, R. G. (1958). A Note on Comparisons of Exchange Rates and Purchasing Power between Countries. Journal of the Royal Statistical Society, Series A, 121, 97-99.
Khamis, S. H. (1970). Properties and Conditions for the Existence of a new Type of Index Number. Sankhya Series B32, 81-98.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
gk_fbmw(milk, start="2019-12", end="2020-04")
gk_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral Geary-Khamis price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
gk_splice(data, start, end, window = 13, splice = "movement", interval = FALSE)
gk_splice(data, start, end, window = 13, splice = "movement", interval = FALSE)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral Geary-Khamis price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
gk_splice(milk, start="2018-12", end="2020-02",splice="half")
gk_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value (or vector of values) of the unweighted "unnamed" harmonic price index.
harmonic(data, start, end, interval = FALSE)
harmonic(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the unweighted bilateral harmonic price index depending on the interval
parameter. 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).
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
harmonic(sugar, start="2018-12", end="2019-12") harmonic(milk, start="2018-12", end="2020-01", interval=TRUE)
harmonic(sugar, start="2018-12", end="2019-12") harmonic(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or a vector of values) of the bilateral hybrid price index. The hybrid index was proposed by Bialek (2020) and it uses correlation coefficients between prices and quantities.
hybrid(data, start, end, base = start, interval = FALSE)
hybrid(data, start, end, base = start, interval = FALSE)
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. '2020-03'. |
end |
The research period (as character) limited to the year and month, e.g. '2020-04'. |
base |
The prior period used in the hybrid price index formula (as character) limited to the year and month, e.g. '2020-01'. |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or a vector of values) of the bilateral hybrid price index depending on the interval
parameter. 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).
Bialek, J. (2020). Proposition of a Hybrid Price Index Formula for the Consumer Price Index Measurement. Equilibrium. Quarterly Journal of Economics and Economic Policy, 15(4), 697-716.
hybrid(sugar, start="2019-12", end="2020-08", base="2018-12") hybrid(milk, start="2019-12", end="2020-08", base="2018-12", interval=TRUE)
hybrid(sugar, start="2019-12", end="2020-08", base="2018-12") hybrid(milk, start="2019-12", end="2020-08", base="2018-12", interval=TRUE)
This function returns a value (or vector of values) of the implicit quadratic mean of order r price index.
IQMp(data, start, end, r = 2, interval = FALSE)
IQMp(data, start, end, r = 2, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter. |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the implicit quadratic mean of order r price index - see CPI Manual (2004), Section 17.37, formula 17.32 (page 321).
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
IQMp(sugar, start="2019-01", end="2020-01") IQMp(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
IQMp(sugar, start="2019-01", end="2020-01") IQMp(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
This function returns a value (or vector of values) of the unweighted bilateral Jevons price index.
jevons(data, start, end, interval = FALSE)
jevons(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the unweighted bilateral Jevons price index depending on the interval
parameter. 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).
Jevons, W. S., (1865). The variation of prices and the value of the currency since 1782. J. Statist. Soc. Lond., 28, 294-320.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
jevons(milk, start="2018-12", end="2020-01") jevons(milk, start="2018-12", end="2020-01", interval=TRUE)
jevons(milk, start="2018-12", end="2020-01") jevons(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral Laspeyres price index.
laspeyres(data, start, end, interval = FALSE)
laspeyres(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Laspeyres price index depending on the interval
parameter. 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).
Laspeyres, E. (1871). Die Berechnung einer mittleren Waarenpreissteigerung. Jahrbucher fur Nationalokonomie und Statistik 16, 296-314.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
laspeyres(sugar, start="2018-12", end="2019-12") laspeyres(milk, start="2018-12", end="2020-01", interval=TRUE)
laspeyres(sugar, start="2018-12", end="2019-12") laspeyres(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral Lehr price index.
lehr(data, start, end, interval = FALSE)
lehr(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Lehr price index depending on the interval
parameter. 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).
Lehr, J. (1885). Beitrage zur Statistik der Preise, insbesondere des Geldes und des Holzes. J. D. Sauerlander, Frankfurt am Main.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
lehr(sugar, start="2018-12", end="2019-12") lehr(milk, start="2018-12", end="2020-01", interval=TRUE)
lehr(sugar, start="2018-12", end="2019-12") lehr(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral Lloyd-Moulton price index.
lloyd_moulton(data, start, end, sigma = 0.7, interval = FALSE)
lloyd_moulton(data, start, end, sigma = 0.7, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
sigma |
The elasticity of substitution parameter (as numeric). |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Lloyd-Moulton price index depending on the interval
parameter. 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).
Lloyd, P. J. (1975). Substitution Effects and Biases in Nontrue Price Indices. The American Economic Review, 65, 301-313.
Moulton, B. R. (1996). Constant Elasticity Cost-of-Living Index in Share-Relative Form. Washington DC: U. S. Bureau of Labor Statistics, mimeograph
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
lloyd_moulton(sugar, start="2018-12", end="2019-12",sigma=0.9) lloyd_moulton(milk, start="2018-12", end="2020-01", interval=TRUE)
lloyd_moulton(sugar, start="2018-12", end="2019-12",sigma=0.9) lloyd_moulton(milk, start="2018-12", end="2020-01", interval=TRUE)
This function loads a list of machine learning model elements from the disk, i.e. the needed 8 files are read.
load_model(dir = "ML_model")
load_model(dir = "ML_model")
dir |
The name of the directory from which the machine learning model is to be loaded. The directory must be in the working directory. |
This function loads a list of ML model elements from the disk, i.e. the needed 8 files are read from the directory selected by dir
. After loading the model it can be used for product classification by using data_classifying
function.
#Setting a temporal directory as a working directory ## Not run: wd<-tempdir() ## Not run: setwd(wd) #Building the model my.grid=list(eta=c(0.01,0.02,0.05),subsample=c(0.5,0.8)) data_train<-dplyr::filter(dataCOICOP,dataCOICOP$time<=as.Date("2021-10-01")) data_test<-dplyr::filter(dataCOICOP,dataCOICOP$time==as.Date("2021-11-01")) ML<-model_classification(data_train,data_test,class="coicop6",grid=my.grid, indicators=c("description","codeIN", "grammage"),key_words=c("uht"),rounds=60) #Saving the model ## Not run: save_model(ML, dir="My_model") #Loading the model ## Not run: ML_fromPC<-load_model("My_model") #classes predicting ## Not run: data_classifying(ML_fromPC, data_test)
#Setting a temporal directory as a working directory ## Not run: wd<-tempdir() ## Not run: setwd(wd) #Building the model my.grid=list(eta=c(0.01,0.02,0.05),subsample=c(0.5,0.8)) data_train<-dplyr::filter(dataCOICOP,dataCOICOP$time<=as.Date("2021-10-01")) data_test<-dplyr::filter(dataCOICOP,dataCOICOP$time==as.Date("2021-11-01")) ML<-model_classification(data_train,data_test,class="coicop6",grid=my.grid, indicators=c("description","codeIN", "grammage"),key_words=c("uht"),rounds=60) #Saving the model ## Not run: save_model(ML, dir="My_model") #Loading the model ## Not run: ML_fromPC<-load_model("My_model") #classes predicting ## Not run: data_classifying(ML_fromPC, data_test)
This function returns a value (or vector of values) of the bilateral Lowe price index.
lowe(data, start, end, base = start, interval = FALSE)
lowe(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the Lowe price index formula (as character) limited to the year and month, e.g. "2020-01". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Lowe price index depending on the interval
parameter. 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).
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
lowe(sugar, start="2019-01", end="2020-01",base="2018-12") lowe(milk, start="2018-12", end="2020-01", interval=TRUE)
lowe(sugar, start="2019-01", end="2020-01",base="2018-12") lowe(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral Marshall-Edgeworth price index.
marshall_edgeworth(data, start, end, interval = FALSE)
marshall_edgeworth(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Marshall-Edgeworth price index depending on the interval
parameter. 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).
Marshall, A. (1887). Remedies for Fluctuations of General Prices. Contemporary Review, 51, 355-375.
Edgeworth, F. Y. (1887). Measurement of Change in Value of Money I. The first Memorandum presented to the British Association for the Advancement of Science; reprinted in Papers Relating to Political Economy, Vol. 1, New York, Burt Franklin, s. 1925.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
marshall_edgeworth(sugar, start="2018-12", end="2019-12") marshall_edgeworth(milk, start="2018-12", end="2020-01", interval=TRUE)
marshall_edgeworth(sugar, start="2018-12", end="2019-12") marshall_edgeworth(milk, start="2018-12", end="2020-01", interval=TRUE)
The function returns all values from the indicated column (defined by the type
parameter) which occur simultaneously in the compared periods or in a given time interval.
matched(data, period1, period2, type = "prodID", interval = FALSE)
matched(data, period1, period2, type = "prodID", interval = FALSE)
data |
The user's data frame. It must contain a column |
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 |
This parameters defines the column which is used in the procedure. Possible values of the |
interval |
A logical parameter indicating whether the procedure is to work for the whole time period between |
The function returns all values from the indicated column (defined by the type
parameter) which occur simultaneously in the compared periods or in a given time interval. Possible values of the type
parameter are: retID
, prodID
, codeIN
, codeOUT
or description
. If the interval
parameter is set to FALSE, then the function compares only periods defined by period1
and period2
. Otherwise the whole time period between period1
and period2
is considered.
matched(milk, period1="2018-12", period2="2019-12", interval=TRUE) matched(milk, period1="2018-12", period2="2019-12", type="description")
matched(milk, period1="2018-12", period2="2019-12", interval=TRUE) matched(milk, period1="2018-12", period2="2019-12", type="description")
The function provides a data frame or a figure presenting the matched_index
function calculated for the column defined by the type
parameter and for each month from the considered time interval
matched_fig( data, start, end, base = "start", type = "prodID", fixedbase = TRUE, figure = TRUE, date_breaks = "1 month" )
matched_fig( data, start, end, base = "start", type = "prodID", fixedbase = TRUE, figure = TRUE, date_breaks = "1 month" )
data |
The user's data frame. It must contain a column |
start |
The beginning of a time interval (as character) limited to the year and month, e.g. "2019-03". |
end |
The end of a time interval (as character) limited to the year and month, e.g. "2019-04". |
base |
The base period (as character) for product comparisons. Its possible values are: "start" and "end". |
type |
This parameter defines the column which is used in the procedure. Possible values of the |
fixedbase |
A logical parameter indicating whether the procedure is to work for subsequent months from the considered time interval ( |
figure |
A logical parameter indicating whether the function returns a figure (TRUE) or a data frame (FALSE) with |
date_breaks |
A string giving the distance between breaks on the X axis like "1 month" (default value) or "4 months". |
The function returns a data frame or a figure presenting the matched_index
function calculated for the column defined by the type
parameter and for each month from the considered time interval. The interval is set by start
and end
parameters. The returned object (data frame or figure) depends on the value of figure
parameter. The returned values belong to [0,1].
matched_fig(milk, start="2018-12", end="2019-12") matched_fig(milk, start="2018-12", end="2019-12", figure=FALSE)
matched_fig(milk, start="2018-12", end="2019-12") matched_fig(milk, start="2018-12", end="2019-12", figure=FALSE)
The function returns a ratio of number of values from the indicated column that occur simultaneously in the compared periods or in a given time interval to the number of all available values from the above-mentioned column (defined by the type
parameter) at the same time.
matched_index(data, period1, period2, type = "prodID", interval = FALSE)
matched_index(data, period1, period2, type = "prodID", interval = FALSE)
data |
The user's data frame. It must contain a column |
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 |
This parameter defines the column which is used in the procedure. Possible values of the |
interval |
A logical parameter indicating whether the procedure is to work for the whole time period between |
The function returns a ratio of number of values from the indicated column that occur simultaneously in the compared periods or in a given time interval to the number of all available values from the above-mentioned column (defined by the type
parameter) at the same time. Possible values of the type
parameter are: retID
, prodID
or description
. If the interval
parameter is set to FALSE, then the function compares only periods defined by period1
and period2
. Otherwise the whole time period between period1
and period2
is considered. The returned value belongs to [0,1].
matched_index(milk, period1="2018-12", period2="2019-12", interval=TRUE) matched_index(milk, period1="2018-12", period2="2019-12", type="retID")
matched_index(milk, period1="2018-12", period2="2019-12", interval=TRUE) matched_index(milk, period1="2018-12", period2="2019-12", type="retID")
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 )
mbennet( data, start, end, wstart = start, matched = FALSE, window = 13, interval = FALSE, contributions = FALSE, prec = 2 )
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The first period of the time window (as character) limited to the year and month, e.g. "2019-12". |
matched |
A logical parameter indicating whether the matched sample approach is to be used (if yes, the parameter has the value TRUE). |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
interval |
A logical parameter indicating whether calculations are to be made for the whole time interval (TRUE) or no (FALSE). |
contributions |
A logical parameter indicating whether contributions of individual products are to be displayed. If it is |
prec |
A numeric vector indicating precision, i.e. the number of decimal places for presenting results. |
This function returns the multilateral Bennet price and quantity indicators and optionally also the price and quantity contributions of individual products.
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)
mbennet(milk, "2018-12", "2019-12", matched=TRUE, contributions=TRUE) mbennet(coffee, start="2018-12", end="2019-03", interval=TRUE)
A collection of scanner data on the sale of milk in one of Polish supermarkets in the period from December 2018 to August 2020
milk
milk
A data frame with 6 columns and 4386 rows. The used variables are as follows:
time
- Dates of transactions (Year-Month-Day)
prices
- Prices of sold products [PLN]
quantities
- Quantities of sold products [liters]
prodID
- Unique product codes (data set contains 68 different prodIDs)
retID
- Unique codes identifying outlets/retailer sale points (data set contains 5 different retIDs)
description
Descriptions of sold milk products (data set contains 6 different product descriptions)
This function returns the multilateral Montgomery price and quantity indicators and optionally also the price and quantity contributions of individual products.
mmontgomery( data, start, end, wstart = start, matched = FALSE, window = 13, interval = FALSE, contributions = FALSE, prec = 2 )
mmontgomery( data, start, end, wstart = start, matched = FALSE, window = 13, interval = FALSE, contributions = FALSE, prec = 2 )
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The first period of the time window (as character) limited to the year and month, e.g. "2019-12". |
matched |
A logical parameter indicating whether the matched sample approach is to be used (if yes, the parameter has the value TRUE). |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
interval |
A logical parameter indicating whether calculations are to be made for the whole time interval (TRUE) or no (FALSE). |
contributions |
A logical parameter indicating whether contributions of individual products are to be displayed. If it is |
prec |
A numeric vector indicating precision, i.e. the number of decimal places for presenting results. |
This function returns the multilateral Montgomery price and quantity indicators and optionally also the price and quantity contributions of individual products.
Montgomery, J. K., (1929). Is There a Theoretically Correct Price Index of a Group of Commodities? Rome, International Institute of Agriculture
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., Pawelec, N. (2024). The use of transitive Montgomery Indicators for scanner data analysis. Argumenta Oeconomica, 2(53).
mmontgomery(milk, "2018-12", "2019-12", matched=TRUE, contributions=TRUE) mmontgomery(coffee, start="2018-12", end="2019-03", interval=TRUE)
mmontgomery(milk, "2018-12", "2019-12", matched=TRUE, contributions=TRUE) mmontgomery(coffee, start="2018-12", end="2019-03", interval=TRUE)
This function provides a trained machine learning model to classify products into classes or any other groups defined by the user. In addition, the function returns the characteristics of the model and figures describing the learning process.
model_classification( data_train = data.frame(), data_test = data.frame(), class = c(), indicators = c(), key_words = c(), sensitivity = FALSE, p = 0.9, w = 0.2, rounds = 200, grid = list() )
model_classification( data_train = data.frame(), data_test = data.frame(), class = c(), indicators = c(), key_words = c(), sensitivity = FALSE, p = 0.9, w = 0.2, rounds = 200, grid = list() )
data_train |
Training data set for the model. This set must contain all the columns defined by the |
data_test |
A test set that is used to validate the machine learning model. This set should have the same structure as the training set, but it is not obligatory. If the test set is not specified by the user then the test set is drawn from the training set (see |
class |
A character string which indicates the column with classes (groups) of products (e.g. COICOPs). |
indicators |
A vector of column names to be considered in building a machine learning model. Important: the indicated variables can be numeric but also categorical (factor or character types are acceptable). |
key_words |
A vector of keywords or phrases that will be recognized in the |
sensitivity |
A logical parameter that indicates whether lowercase or uppercase letters are to be distinguished when the |
p |
A parameter related to creating the testing set, if it has not been specified by the user. The test set is then created on the basis of a class-balanced subsample of the training set. The size of this subsample is 100p percents of the training set size. |
w |
A parameter for determining the measure of choosing the optimal machine learning model. For each combination of parameters specified in the |
rounds |
The maximum number of iterations during the training stage. |
grid |
The list of vectors of parameters which are taken into consideration during the |
In general, this function provides a trained machine learning model to classify products into classes (or any other groups). In addition, the function returns the characteristics of the model and figures describing the learning process. The machine learning process is based on the XGBoost
algorithm (from the XGBoost
package) which is an implementation of gradient boosted decision trees designed for speed and performance. The function takes into account each combination of model parameters (specified by the grid
list) and provides, inter alia, an optimally trained model (a model that minimizes the error rate calculated on the basis of a fixed value of the w
parameter). After all, the function returns a list of the following objects: model
- the optimally trained model; best_parameters
- a set of parameters of the optimal model; indicators
- a vector of all indicators used; key_words
- a vector of all key words and phrases used; classes
- a dataframe with categorized classes; sensitivity
- a value of the used 'sensitivity' parameter; figure_training
- a plot of the error levels calculated for the training set and the testing set during the learning process of the returned model (error = 1 - accuracy); figure_importance
- a plot of the relative importance of the used indicators.
Tianqi Chen and Carlos Guestrin (2016). XGBoost: A Scalable Tree Boosting System. 22nd SIGKDD Conference on Knowledge Discovery and Data Mining.
my.grid=list(eta=c(0.01,0.02,0.05),subsample=c(0.5,0.8)) data_train<-dplyr::filter(dataCOICOP,dataCOICOP$time<=as.Date("2021-10-01")) data_test<-dplyr::filter(dataCOICOP,dataCOICOP$time==as.Date("2021-11-01")) ML<-model_classification(data_train,data_test,class="coicop6",grid=my.grid, indicators=c("description","codeIN","grammage"),key_words=c("uht"),rounds=60) ML$best_parameters ML$indicators ML$figure_training ML$figure_importance
my.grid=list(eta=c(0.01,0.02,0.05),subsample=c(0.5,0.8)) data_train<-dplyr::filter(dataCOICOP,dataCOICOP$time<=as.Date("2021-10-01")) data_test<-dplyr::filter(dataCOICOP,dataCOICOP$time==as.Date("2021-11-01")) ML<-model_classification(data_train,data_test,class="coicop6",grid=my.grid, indicators=c("description","codeIN","grammage"),key_words=c("uht"),rounds=60) ML$best_parameters ML$indicators ML$figure_training ML$figure_importance
This function returns the Montgomery price and quantity indicators and optionally also the price and quantity contributions of individual products.
montgomery( data, start, end, interval = FALSE, matched = FALSE, contributions = FALSE, prec = 2 )
montgomery( data, start, end, interval = FALSE, matched = FALSE, contributions = FALSE, prec = 2 )
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical parameter indicating whether calculations are to be made for the whole time interval (TRUE) or no (FALSE). |
matched |
A logical parameter indicating whether the matched sample approach is to be used (if yes, the parameter has the value TRUE). |
contributions |
A logical parameter indicating whether contributions of individual products are to be displayed. If it is |
prec |
A numeric vector indicating precision, i.e. the number of decimal places for presenting results. |
This function returns the Montgomery price and quantity indicators and optionally also the price and quantity contributions of individual products.
Montgomery, J. K., (1929). Is There a Theoretically Correct Price Index of a Group of Commodities? Rome, International Institute of Agriculture
montgomery(milk, "2018-12", "2019-12", matched=TRUE, contributions=TRUE) montgomery(coffee, start="2018-12", end="2019-03", interval=TRUE)
montgomery(milk, "2018-12", "2019-12", matched=TRUE, contributions=TRUE) montgomery(coffee, start="2018-12", end="2019-03", interval=TRUE)
This function returns a value (or vector of values) of the bilateral Paasche price index.
paasche(data, start, end, interval = FALSE)
paasche(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Paasche price index depending on the interval
parameter. 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).
Paasche, H. (1874). Uber die Preisentwicklung der letzten Jahre nach den Hamburger Borsennotirungen. Jahrbucher fur Nationalokonomie und Statistik, 12, 168-178.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
paasche(sugar, start="2018-12", end="2019-12") paasche(milk, start="2018-12", end="2020-01", interval=TRUE)
paasche(sugar, start="2018-12", end="2019-12") paasche(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral Palgrave price index.
palgrave(data, start, end, interval = FALSE)
palgrave(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Palgrave price index depending on the interval
parameter. 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).
Palgrave, R. H. I. (1886). Currency and Standard of Value in England, France and India and the Rates of Exchange Between these Countries. Memorandum submitted to the Royal Commission on Depression of trade and Industry, Third Report, Appendix B, 312-390.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
palgrave(sugar, start="2018-12", end="2019-12") palgrave(milk, start="2018-12", end="2020-01", interval=TRUE)
palgrave(sugar, start="2018-12", end="2019-12") palgrave(milk, start="2018-12", end="2020-01", interval=TRUE)
The function returns correlation between price and quantity of sold products with given IDs.
pqcor(data, period, set = c(), figure = FALSE)
pqcor(data, period, set = c(), figure = FALSE)
data |
The user's data frame. It must contain columns: |
period |
The time period (as character) limited to the year and month, e.g. "2019-03". |
set |
The set of unique product IDs to be used for determining correlation between price and quantity of sold products (see also |
figure |
A logical parameter indicating whether the function returns a figure (TRUE) or a data frame (FALSE) with correlations between price and quantity of sold products. |
The function returns Pearson's correlation coefficient between price and quantity of products with given IDs and sold in period
.
pqcor(milk, period="2019-03") pqcor(milk, period="2019-03",figure=TRUE)
pqcor(milk, period="2019-03") pqcor(milk, period="2019-03",figure=TRUE)
The function returns Pearson's correlation coefficients between price and quantity of sold products with given IDs.
pqcor_fig(data, start, end, figure = TRUE, date_breaks = "1 month", set = c())
pqcor_fig(data, start, end, figure = TRUE, date_breaks = "1 month", set = c())
data |
The user's data frame. It must contain columns: |
start |
The beginning of the considered time interval (as character) limited to the year and month, e.g. "2020-03". |
end |
The end of the considered time interval (as character) limited to the year and month, e.g. "2020-04". |
figure |
A logical parameter indicating whether the function returns a figure (TRUE) or a data frame (FALSE) with price-quantity correlations. |
date_breaks |
A string giving the distance between breaks on the X axis like "1 month" (default value) or "4 months". |
set |
The set of unique product IDs to be used for determining correlation between prices and quantities of sold products (see also |
The function returns Pearson's correlation coefficients between price and quantity of products with given IDs and sold in the time interval: <start, end>
. Correlation coefficients are calculated for each month separately. Results are presented in tabular or graphical form depending on the figure
parameter.
pqcor_fig(milk, start="2018-12", end="2019-12", figure=FALSE) pqcor_fig(milk, start="2018-12", end="2019-12", figure=TRUE)
pqcor_fig(milk, start="2018-12", end="2019-12", figure=FALSE) pqcor_fig(milk, start="2018-12", end="2019-12", figure=TRUE)
This function returns a value or values of the selected price indices.
price_indices( data, start, end, formula = c(), window = c(), splice = c(), base = c(), sigma = c(), r = c(), interval = FALSE, names = c() )
price_indices( data, start, end, formula = c(), window = c(), splice = c(), base = c(), sigma = c(), r = c(), interval = FALSE, names = c() )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
formula |
A vector of character strings indicating price index formulas that are to be calculated. To see available options please use the link: |
window |
A vector of integers. Each element of the vector defines the length of the time window of the corresponding multilateral index. |
splice |
A vector of character strings. Each element of the vector indicates the splicing method is to be used for the corresponding multilateral index. Available values of vector elements are: "movement", "window","half","mean" and their additional variants: "window_published", "half_published" and "mean_published". |
base |
The vector of prior periods used in the Young- or Lowe-type price indices or hybrid/geohybrid index. Each element of the vector (as character) must be limited to the year and month, e.g. "2020-01". |
sigma |
The vector of elasticity of substitution parameters used in the Lloyd-Moulton, AG Mean or GEKS-LM indices (as numeric). |
r |
The vector of non-zero parameters used in the quadratic mean of order r quantity / price index or in the GEKS-QM index (as numeric). |
interval |
A logical value indicating whether the function is to provide price indices comparing the research period defined by |
names |
A vector of strings indicating names of indices which are to be used in the resulting data frame. |
This general function returns a value or values of the selected price indices. If the interval
parameter is set to TRUE, then it returns a data frame where its first column indicates dates and the remaining columns show corresponding values of all selected price indices. 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).
price_indices(milk, start="2018-12",end="2019-12", formula=c("geks","ccdi","hybrid","fisher", "QMp","young","geksl_fbew"), window=c(13,13), base=c("2019-03","2019-03"), r=c(3),interval=TRUE) price_indices(milk, start="2018-12",end="2019-12", formula=c("geks","ccdi","hybrid","fisher", "QMp","young","geksl_fbew"), window=c(13,13), base=c("2019-03","2019-03"), r=c(3),interval=FALSE)
price_indices(milk, start="2018-12",end="2019-12", formula=c("geks","ccdi","hybrid","fisher", "QMp","young","geksl_fbew"), window=c(13,13), base=c("2019-03","2019-03"), r=c(3),interval=TRUE) price_indices(milk, start="2018-12",end="2019-12", formula=c("geks","ccdi","hybrid","fisher", "QMp","young","geksl_fbew"), window=c(13,13), base=c("2019-03","2019-03"), r=c(3),interval=FALSE)
The PriceIndices package is a tool for Bilateral and Multilateral Price Index Calculations. A demonstration of package functions is here: README. The package documentation can be found HERE. The list of package functions is as follows:
The function returns prices (unit values) of sold products with given IDs.
prices(data, period, set = c(), ID = FALSE)
prices(data, period, set = c(), ID = FALSE)
data |
The user's data frame. It must contain columns: |
period |
The time period (as character) limited to the year and month, e.g. "2019-03". |
set |
The set of unique product IDs to be used for determining prices of sold products (see also |
ID |
A logical parameter indicating whether a data frame with prodIDs and prices (unit values) should be returned. |
The function analyzes the user's data frame and returns prices (unit value) of products with given ID
and being sold in the time period indicated by the period
parameter. Please note, that the function returns the price values for sorted prodIDs and in the absence of a given prodID in the data set, the function returns nothing (it does not return zero). If the ID parameter is set to TRUE then the function returns a data frame with columns: by
(IDs of products) and uv
(unit values of products).
prices(milk, period="2019-06") prices(milk, period="2019-12", set=c(400032, 82919), ID=TRUE)
prices(milk, period="2019-06") prices(milk, period="2019-12", set=c(400032, 82919), ID=TRUE)
This function detects and summarises available, matched, new as well as disappearing products on the basis of their prodIDs.
products(data, start, end)
products(data, start, end)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function detects and summarises available, matched, new and disappearing products on the basis of their prodIDs. It compares products from the base period (start
) with products from the current period (end
). It returns a list containing the following objects: details
with prodIDs of available, matched, new and disappearing products, statistics
with basic statistics for them and figure
with a pie chart describing a contribution of matched, new and disappearing products in a set of available products.
list<-products(milk, "2018-12","2019-12") list$details list$statistics list$figure
list<-products(milk, "2018-12","2019-12") list$details list$statistics list$figure
This function returns a figure with plots of volume (or contributions) of available, matched, new as well as disappearing products.
products_fig( data, start, end, show = c("available", "matched", "new", "disappearing"), fixed_base = TRUE, contributions = TRUE, date_breaks = "1 month" )
products_fig( data, start, end, show = c("available", "matched", "new", "disappearing"), fixed_base = TRUE, contributions = TRUE, date_breaks = "1 month" )
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
show |
A character vector indicating which groups of products are to be taken into consideration. Available options are |
fixed_base |
A logical parameter indicating whether each month is to be compared to the base period (TRUE) or to the previous month (then it is set to FALSE). |
contributions |
A logical parameter indicating whether contributions or volumes counted for available, matched, new and disappearing products are to be displayed. |
date_breaks |
A string giving the distance between breaks on the X axis like "1 month" (default value) or "4 months". |
This function returns a figure with plots of volume (or contributions) of available, matched, new as well as disappearing products. The User may control which groups of products are to be taken into consideration (see the show
parameter). Available options are available
, matched
, new
and disappearing
.
products_fig(milk, "2018-12","2019-04", fixed_base=TRUE, contributions=FALSE, show=c("new","disappearing","matched","available"))
products_fig(milk, "2018-12","2019-04", fixed_base=TRUE, contributions=FALSE, show=c("new","disappearing","matched","available"))
This function returns a value (or vector of values) of the quadratic mean of order r price index.
QMp(data, start, end, r = 2, interval = FALSE)
QMp(data, start, end, r = 2, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter. |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the quadratic mean of order r price index - see CPI Manual (2004), Section 17.40, formula 17.35 (page 321).
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
QMp(sugar, start="2019-01", end="2020-01") QMp(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
QMp(sugar, start="2019-01", end="2020-01") QMp(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
This function returns a value (or vector of values) of the quadratic mean of order r quantity index.
QMq(data, start, end, r = 2, interval = FALSE)
QMq(data, start, end, r = 2, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
r |
The real and non-zero parameter. |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the quadratic mean of order r quantity index - see CPI Manual (2004), Section 17.35, formula 17.30 (page 321).
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
QMq(sugar, start="2019-01", end="2020-01") QMq(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
QMq(sugar, start="2019-01", end="2020-01") QMq(sugar, start="2019-01", end="2020-01", r=1.3, interval=TRUE)
This function returns a value of the quality adjusted unit value index (QU index) for a given set of adjustment factors.
QU(data, start, end, v)
QU(data, start, end, v)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
v |
The data frame with adjustment factors for at least all matched prodIDs. It must contain two columns: |
This function returns a value of the quality adjusted unit value index (QU index) for a given set of adjustment factors (adjusted factors must be available for all matched prodIDs).
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
## Creating a data frame with artificial adjustment factors ## (random numbers from uniform distribution U[1,2]) prodID<-unique(milk$prodID) values<-stats::runif(length(prodID),1,2) v<-data.frame(prodID,values) ## Calculating the QU index for the created data frame 'v' QU(milk, start="2018-12", end="2019-12", v)
## Creating a data frame with artificial adjustment factors ## (random numbers from uniform distribution U[1,2]) prodID<-unique(milk$prodID) values<-stats::runif(length(prodID),1,2) v<-data.frame(prodID,values) ## Calculating the QU index for the created data frame 'v' QU(milk, start="2018-12", end="2019-12", v)
The function returns quantities of sold products with given IDs.
quantities(data, period, set = c(), ID = FALSE)
quantities(data, period, set = c(), ID = FALSE)
data |
The user's data frame. It must contain columns: |
period |
The time period (as character) limited to the year and month, e.g. "2019-03". |
set |
The set of unique product IDs to be used for determining quantities of sold products (see also |
ID |
A logical parameter indicating whether a data frame with prodIDs and quantities should be returned. |
The function analyzes the user's data frame and returns quantities of products with given ID
and being sold in the time period indicated by the period
parameter. Please note that the function returns the quantity values for sorted prodIDs and in the absence of a given prodID in the data set, the function returns nothing (it does not return zero). If the ID parameter is set to TRUE then the function returns a data frame with columns: by
(IDs of products) and q
(quantities of products).
quantities(milk, period="2019-06") quantities(milk, period="2019-12", set=c(400032, 82919), ID=TRUE)
quantities(milk, period="2019-06") quantities(milk, period="2019-12", set=c(400032, 82919), ID=TRUE)
The function returns values of sales of products with given IDs.
sales(data, period, set = c(), shares = FALSE, hist = FALSE)
sales(data, period, set = c(), shares = FALSE, hist = FALSE)
data |
The user's data frame. It must contain columns: |
period |
The time period (as character) limited to the year and month, e.g. "2019-03". |
set |
The set of unique product IDs to be used for determining product sales values (see also |
shares |
A logical parameter indicating whether the function is to return shares of product sales. |
hist |
A logical parameter indicating whether the function is to return histogram of product sales. |
The function analyzes the user's data frame and returns values of sales of products with given IDs and being sold in time period indicated by the period
parameter (see also expenditures
function which returns the expenditure values for sorted prodIDs).
sales(milk, period="2019-06", shares=TRUE, hist=TRUE) sales(milk, period="2019-12",set=unique(milk$prodID)[1])
sales(milk, period="2019-06", shares=TRUE, hist=TRUE) sales(milk, period="2019-12",set=unique(milk$prodID)[1])
The function returns values of sales of products from one or more datasets or the corresponding barplot for these sales.
sales_groups( datasets = list(), start, end, shares = FALSE, barplot = FALSE, names = c() )
sales_groups( datasets = list(), start, end, shares = FALSE, barplot = FALSE, names = c() )
datasets |
A list of user's data frames. Each data frame must contain columns: |
start |
The beginning of the considered time interval (as character) limited to the year and month, e.g. "2020-03". |
end |
The end of the considered time interval (as character) limited to the year and month, e.g. "2020-04". |
shares |
A logical parameter indicating whether the function is to calculate shares of product sales |
barplot |
A logical parameter indicating whether the function is to return barplot for product sales. |
names |
A vector of characters describing product groups defined by |
The function returns values of sales of products from one or more datasets or the corresponding barplot for these sales (if barplot
is TRUE). Alternatively, it calculates the sale shares (if shares
is TRUE).
## Creating 3 subgroups of milk: ctg<-unique(milk$description) categories<-c(ctg[1],ctg[2],ctg[3]) milk1<-dplyr::filter(milk, milk$description==categories[1]) milk2<-dplyr::filter(milk, milk$description==categories[2]) milk3<-dplyr::filter(milk, milk$description==categories[3]) ## Sample use of this function: sales_groups(datasets=list(milk1,milk2,milk3),start="2019-04",end="2019-04",shares=TRUE) sales_groups(datasets=list(milk1,milk2,milk3),start="2019-04",end="2019-07", barplot=TRUE, names=categories)
## Creating 3 subgroups of milk: ctg<-unique(milk$description) categories<-c(ctg[1],ctg[2],ctg[3]) milk1<-dplyr::filter(milk, milk$description==categories[1]) milk2<-dplyr::filter(milk, milk$description==categories[2]) milk3<-dplyr::filter(milk, milk$description==categories[3]) ## Sample use of this function: sales_groups(datasets=list(milk1,milk2,milk3),start="2019-04",end="2019-04",shares=TRUE) sales_groups(datasets=list(milk1,milk2,milk3),start="2019-04",end="2019-07", barplot=TRUE, names=categories)
The function returns values of sales of products or the corresponding barplot for these sales.
sales_groups2( data = data.frame(), by, start, end, shares = FALSE, barplot = FALSE, names = c() )
sales_groups2( data = data.frame(), by, start, end, shares = FALSE, barplot = FALSE, names = c() )
data |
The user's data frame with subgroups of sold products (see |
by |
The column name indicating grouping variable, i.e. this column is used for creating subgroups of products. |
start |
The beginning of the considered time interval (as character) limited to the year and month, e.g. "2020-03". |
end |
The end of the considered time interval (as character) limited to the year and month, e.g. "2020-04". |
shares |
A logical parameter indicating whether the function is to calculate shares of product sales |
barplot |
A logical parameter indicating whether the function is to return barplot for product sales. |
names |
A vector of characters describing product groups defined by |
The function returns values of sales of products or the corresponding barplot for these sales (if barplot
is TRUE). Alternatively, it calculates the sale shares (if shares
is TRUE).
outlets<-as.character(unique(milk$retID)) sales_groups2(milk,by="retID",start="2019-04",end="2019-04", shares=TRUE,barplot=TRUE,names=outlets)
outlets<-as.character(unique(milk$retID)) sales_groups2(milk,by="retID",start="2019-04",end="2019-04", shares=TRUE,barplot=TRUE,names=outlets)
This function returns a value (or vector of values) of the bilateral Vartia-II (Sato-Vartia) price index.
sato_vartia(data, start, end, interval = FALSE)
sato_vartia(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Vartia-II (Sato-Vartia) price index depending on the interval
parameter. 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).
Sato, K. (1976). The Ideal Log-Change Index Number. The Review of Economics and Statistics, 58(2), 223-228.
Vartia, Y. 0. (1976). Ideal Log-Change Index Numbers . Scandinavian Journal of Statistics 3(3), 121-126.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
sato_vartia(sugar, start="2018-12", end="2019-12") sato_vartia(milk, start="2018-12", end="2020-01", interval=TRUE)
sato_vartia(sugar, start="2018-12", end="2019-12") sato_vartia(milk, start="2018-12", end="2020-01", interval=TRUE)
This function saves a list of machine learning model elements on the disk, i.e. the resulting 8 files are written.
save_model(model = list(), dir = "ML_model")
save_model(model = list(), dir = "ML_model")
model |
A list of 8 elements which identify the previously built machine learning model (the list is obtained via the |
dir |
The name of the directory where the selected model should be saved. The directory with all necessary files will be created in the working directory. |
This function saves a list of ML model elements on the disk, i.e. the resulting 8 files are written into the new directory specified by dir
. The list should be obtained previously using the model_classification
function. After saving the model, it can be loaded at any time by using the load_model
function.
#Setting a temporal directory as a working director ## Not run: wd<-tempdir() ## Not run: setwd(wd) #Building the model #Building the model my.grid=list(eta=c(0.01,0.02,0.05),subsample=c(0.5,0.8)) data_train<-dplyr::filter(dataCOICOP,dataCOICOP$time<=as.Date("2021-10-01")) data_test<-dplyr::filter(dataCOICOP,dataCOICOP$time==as.Date("2021-11-01")) ML<-model_classification(data_train,data_test,class="coicop6",grid=my.grid, indicators=c("description","codeIN", "grammage"),key_words=c("uht"),rounds=60) #Saving the model ## Not run: save_model(ML, dir="My_model")
#Setting a temporal directory as a working director ## Not run: wd<-tempdir() ## Not run: setwd(wd) #Building the model #Building the model my.grid=list(eta=c(0.01,0.02,0.05),subsample=c(0.5,0.8)) data_train<-dplyr::filter(dataCOICOP,dataCOICOP$time<=as.Date("2021-10-01")) data_test<-dplyr::filter(dataCOICOP,dataCOICOP$time==as.Date("2021-11-01")) ML<-model_classification(data_train,data_test,class="coicop6",grid=my.grid, indicators=c("description","codeIN", "grammage"),key_words=c("uht"),rounds=60) #Saving the model ## Not run: save_model(ML, dir="My_model")
This function detects and summarises downsized and upsized products.
shrinkflation( data, start, end, type = "shrinkflation", min_p_change = 0, max_p_change = Inf, min_s_change = 0, max_s_change = Inf, prec = 3, interval = FALSE )
shrinkflation( data, start, end, type = "shrinkflation", min_p_change = 0, max_p_change = Inf, min_s_change = 0, max_s_change = Inf, prec = 3, interval = FALSE )
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. "2024-01". |
end |
The research period (as character) limited to the year and month, e.g. "2024-02". |
type |
A parameter specifying what phenomenon is to be included in the resulting elements of the returned list (i.e. in returned |
min_p_change |
Lower limit for unit price change, i.e.: a product is considered if the percentage change in its unit price is greater than the value of this parameter. The default value is zero, possibly positive values can be considered (in percentage). |
max_p_change |
Upper limit for unit price change, i.e.: a product is considered if the percentage change in its unit price is less than the value of this parameter. The default value is Inf, possibly positive values can be considered (in percentage). |
min_s_change |
Lower limit for size change, i.e.: a product is considered if the percentage change in its size is greater than the value of this parameter. The default value is zero, possibly positive values can be considered (in percentage). |
max_s_change |
Upper limit for size change, i.e.: a product is considered if the percentage change in its size is less than the value of this parameter. The default value is Inf, possibly positive values can be considered (in percentage). |
prec |
Number of decimal places for the presented summary results. |
interval |
A parameter that specifies whether the search for downsized products should consider the entire time interval, or only the compared months specified by the |
This function detects and summarises downsized and upsized products. The function detects phenomena such as: shrinkflation
, shrinkdeflation
, sharkflation
, unshrinkdeflation
, unshrinkflation
, sharkdeflation
(see the type
parameter). It returns a list containing the following objects: df_changes
- data frame with detailed information on downsized and upsized products with the whole history of size changes, df_type
- data frame with recognized type of products, df_overview
- a table with basic summary of all detected products grouped by the type
parameter, products_detected
with prodIDs of products indicated by the 'type' parameter, df_detected
being a subset of the data frame with only detected products, df_reduced
which is the difference of the input data frame and the data frame containing the detected products,
and df_summary
which provides basic statistics for all detected downsized and upsized products (including their share in the total number of products and mean price and size changes).
Białek, J., Bobel, A., Oprych-Franków D. (2004). Immeasurability of shrinkflation in the CPI? Automatic downsizing detection using scanner data. 18th Meeting of the Ottawa Group, Ottawa.
#Data matching over time df<-data_matching(data=data_DOWN_UP_SIZED, start="2024-01", end="2024-02", codeIN=TRUE,codeOUT=TRUE,description=TRUE, onlydescription=FALSE,precision=0.9,interval=FALSE) # Extraction of information about grammage (if needed) df<-data_unit(df,units=c("g|ml|kg|l"),multiplication="x") # Price standardization df<-data_norm(df, rules=list(c("ml","l",1000),c("g","kg",1000))) # Downsized and upsized products detection result<-shrinkflation(data=df, start="2024-01","2024-02", prec=3, interval=FALSE, type="shrinkflation") result$df_changes result$df_type result$df_overview result$products_detected result$df_detected result$df_reduced result$df_summary
#Data matching over time df<-data_matching(data=data_DOWN_UP_SIZED, start="2024-01", end="2024-02", codeIN=TRUE,codeOUT=TRUE,description=TRUE, onlydescription=FALSE,precision=0.9,interval=FALSE) # Extraction of information about grammage (if needed) df<-data_unit(df,units=c("g|ml|kg|l"),multiplication="x") # Price standardization df<-data_norm(df, rules=list(c("ml","l",1000),c("g","kg",1000))) # Downsized and upsized products detection result<-shrinkflation(data=df, start="2024-01","2024-02", prec=3, interval=FALSE, type="shrinkflation") result$df_changes result$df_type result$df_overview result$products_detected result$df_detected result$df_reduced result$df_summary
This function returns a value of the multilateral SPQ price index which is based on the relative price and quantity dissimilarity measure.
SPQ(data, start, end, interval = FALSE)
SPQ(data, start, end, interval = FALSE)
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 |
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).
Diewert, E. (2020). The Chain Drift Problem and Multilateral Indexes. Chapter 6 in: Consumer Price Index Theory (draft)
SPQ(sugar, start="2018-12",end="2019-02") SPQ(milk, start="2018-12",end="2019-12",interval=TRUE)
SPQ(sugar, start="2018-12",end="2019-02") SPQ(milk, start="2018-12",end="2019-12",interval=TRUE)
This function returns a value (or vector of values) of the bilateral Stuvel price index.
stuvel(data, start, end, interval = FALSE)
stuvel(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Stuvel price index depending on the interval
parameter. 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).
Stuvel, G. (1957). A New Index Number Formula. Econometrica, 25, 123-131.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
stuvel(sugar, start="2018-12", end="2019-12") stuvel(milk, start="2018-12", end="2020-01", interval=TRUE)
stuvel(sugar, start="2018-12", end="2019-12") stuvel(milk, start="2018-12", end="2020-01", interval=TRUE)
A collection of scanner data on the sale of sugar in one of Polish supermarkets in the period from December 2017 to October 2020
sugar
sugar
A data frame with 6 columns and 7666 rows. The used variables are as follows:
time
- Dates of transactions (Year-Month-Day)
prices
- Prices of sold products [PLN]
quantities
- Quantities of sold products [kg]
prodID
- Unique product codes (data set contains 11 different prodIDs)
retID
- Unique codes identifying outlets/retailer sale points (data set contains 20 different retIDs)
description
Descriptions of sold sugar products (data set contains 3 different product descriptions)
This function calculates the theoretical value of the unweighted price index for lognormally distributed prices.
tindex(pmi = c(), psigma = c(), start, ratio = TRUE)
tindex(pmi = c(), psigma = c(), start, ratio = TRUE)
pmi |
A numeric vector indicating |
psigma |
A numeric vector indicating |
start |
The first period in the generated data frame (as character) limited to the year and month, e.g. '2019-12'. |
ratio |
A logical parameter indicating how we define the theoretical unweighted price index. If it is set to TRUE, then the resulting value is a ratio of expected price values from compared months; otherwise the resulting value is the expected value of the ratio of prices from compared months. |
This function calculates the theoretical value of the unweighted price index for lognormally distributed prices (the month defined by start
parameter plays a role of the fixed base period). The characteristics for these lognormal distributions are set by pmi
and sigma
parameters. The ratio
parameter allows to control the definition of resulting theoretical price index values. The function provides a data frame consisting of dates and corresponding expected values of the theoretical unweighted price index. The generated dataset is ready for further price index calculations.
tindex(pmi=c(1,1.2,1.3),psigma=c(0.1,0.2,0.15),start="2020-01") tindex(pmi=c(1,1.2,1.3),psigma=c(0.1,0.2,0.15),start="2020-01",ratio=FALSE)
tindex(pmi=c(1,1.2,1.3),psigma=c(0.1,0.2,0.15),start="2020-01") tindex(pmi=c(1,1.2,1.3),psigma=c(0.1,0.2,0.15),start="2020-01",ratio=FALSE)
This function returns a value (or vector of values) of the bilateral Tornqvist price index.
tornqvist(data, start, end, interval = FALSE)
tornqvist(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Tornqvist price index depending on the interval
parameter. 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).
Tornqvist, L. (1936). The Bank of Finland's Consumption Price Index. Bank of Finland Monthly Bulletin 10, 1-8.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
tornqvist(sugar, start="2018-12", end="2019-12") tornqvist(milk, start="2018-12", end="2020-01", interval=TRUE)
tornqvist(sugar, start="2018-12", end="2019-12") tornqvist(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value of the multilateral TPD (Time Product Dummy) price index.
tpd(data, start, end, wstart = start, window = 13)
tpd(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral TPD price index which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). Please note that a Weighted Least Squares (WLS) regression is run with the expenditure shares in each period serving as weights.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).
de Haan, J. and F. Krsinich (2014). Time Dummy Hedonic and Quality-Adjusted Unit Value Indexes: Do They Really Differ? Paper presented at the Society for Economic Measurement Conference, 18-20 August 2014, Chicago, U.S.
tpd(milk, start="2019-01", end="2019-08",window=10) tpd(milk, start="2018-12", end="2019-12")
tpd(milk, start="2019-01", end="2019-08",window=10) tpd(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral TPD price index (Time Product Dummy index) extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
tpd_fbew(data, start, end)
tpd_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral TPD price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
de Haan, J. and F. Krsinich (2014). Time Dummy Hedonic and Quality-Adjusted Unit Value Indexes: Do They Really Differ? Paper presented at the Society for Economic Measurement Conference, 18-20 August 2014, Chicago, U.S.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
tpd_fbew(milk, start="2018-12", end="2019-08")
tpd_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral TPD price index (Time Product Dummy index) extended by using the FBMW (Fixed Base Moving Window) method.
tpd_fbmw(data, start, end)
tpd_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral TPD price index extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
de Haan, J. and F. Krsinich (2014). Time Dummy Hedonic and Quality-Adjusted Unit Value Indexes: Do They Really Differ? Paper presented at the Society for Economic Measurement Conference, 18-20 August 2014, Chicago, U.S.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
tpd_fbmw(milk, start="2019-12", end="2020-04")
tpd_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral TPD price index (Time Product Dummy index) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
tpd_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
tpd_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral TPD price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
de Haan, J. and F. Krsinich (2014). Time Dummy Hedonic and Quality-Adjusted Unit Value Indexes: Do They Really Differ? Paper presented at the Society for Economic Measurement Conference, 18-20 August 2014, Chicago, U.S.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
tpd_splice(milk, start="2018-12", end="2020-02",splice="half")
tpd_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value (or vector of values) of the unit value index
unit_value_index(data, start, end, interval = FALSE)
unit_value_index(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the unit value index. The value index is calculated as the unit value at time start
divided by the unit value at time start
.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
unit_value_index(sugar, start="2019-01", end="2020-01") unit_value_index(sugar, start="2019-01", end="2020-01", interval=TRUE)
unit_value_index(sugar, start="2019-01", end="2020-01") unit_value_index(sugar, start="2019-01", end="2020-01", interval=TRUE)
This function returns a value of the unweighted multilateral TPD (Time Product Dummy) price index.
utpd(data, start, end, wstart = start, window = 13)
utpd(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the unweighted multilateral TPD price index which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). Please note, that the estimation procedure runs the Ordinary Least Squares (OLS) method instead of the Weighted Least Squares (WLS) method like in the case of the TPD index. 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).
de Haan, J. and F. Krsinich (2014). Time Dummy Hedonic and Quality-Adjusted Unit Value Indexes: Do They Really Differ? Paper presented at the Society for Economic Measurement Conference, 18-20 August 2014, Chicago, U.S.
utpd(milk, start="2019-01", end="2019-08",window=10) utpd(milk, start="2018-12", end="2019-12")
utpd(milk, start="2019-01", end="2019-08",window=10) utpd(milk, start="2018-12", end="2019-12")
This function returns a value of the unweighted multilateral TPD price index (Time Product Dummy index) extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
utpd_fbew(data, start, end)
utpd_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the unweighted multilateral TPD price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
de Haan, J. and F. Krsinich (2014). Time Dummy Hedonic and Quality-Adjusted Unit Value Indexes: Do They Really Differ? Paper presented at the Society for Economic Measurement Conference, 18-20 August 2014, Chicago, U.S.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
utpd_fbew(milk, start="2018-12", end="2019-08")
utpd_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the unweighted multilateral TPD price index (Time Product Dummy index) extended by using the FBMW (Fixed Base Moving Window) method.
utpd_fbmw(data, start, end)
utpd_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the unweighted multilateral TPD price index extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
de Haan, J. and F. Krsinich (2014). Time Dummy Hedonic and Quality-Adjusted Unit Value Indexes: Do They Really Differ? Paper presented at the Society for Economic Measurement Conference, 18-20 August 2014, Chicago, U.S.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
utpd_fbmw(milk, start="2019-12", end="2020-04")
utpd_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the unweighted multilateral TPD price index (Time Product Dummy index) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
utpd_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
utpd_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the unweighted multilateral TPD price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
de Haan, J. and F. Krsinich (2014). Time Dummy Hedonic and Quality-Adjusted Unit Value Indexes: Do They Really Differ? Paper presented at the Society for Economic Measurement Conference, 18-20 August 2014, Chicago, U.S.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
utpd_splice(milk, start="2018-12", end="2020-02",splice="half")
utpd_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value (or vector of values) of the value index
value_index(data, start, end, interval = FALSE)
value_index(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the value index. The value index is calculated as sum of expenditures from period end
divided by sum of expenditures from period start
.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
value_index(sugar, start="2019-01", end="2020-01") value_index(sugar, start="2019-01", end="2020-01", interval=TRUE)
value_index(sugar, start="2019-01", end="2020-01") value_index(sugar, start="2019-01", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral Vartia-I price index.
vartia(data, start, end, interval = FALSE)
vartia(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Vartia-I price index depending on the interval
parameter. 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).
Vartia, Y. 0. (1976). Ideal Log-Change Index Numbers . Scandinavian Journal of Statistics 3(3), 121-126.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
vartia(sugar, start="2018-12", end="2019-12") vartia(milk, start="2018-12", end="2020-01", interval=TRUE)
vartia(sugar, start="2018-12", end="2019-12") vartia(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value (or vector of values) of the bilateral Walsh price index.
walsh(data, start, end, interval = FALSE)
walsh(data, start, end, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Walsh price index depending on the interval
parameter. 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).
Walsh, C. M. (1901). The Measurement of General Exchange Value. The MacMillan Company, New York.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
Von der Lippe, P. (2007). Index Theory and Price Statistics. Peter Lang: Berlin, Germany.
walsh(sugar, start="2018-12", end="2019-12") walsh(milk, start="2018-12", end="2020-01", interval=TRUE)
walsh(sugar, start="2018-12", end="2019-12") walsh(milk, start="2018-12", end="2020-01", interval=TRUE)
This function returns a value of the multilateral weighted WGEKS price index (to be more precise: the weighted GEKS index based on the Fisher formula).
wgeks(data, start, end, wstart = start, window = 13)
wgeks(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral weighted WGEKS price index (to be more precise: the weighted GEKS index based on the Fisher formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
wgeks(milk, start="2019-01", end="2019-08",window=10) wgeks(milk, start="2018-12", end="2019-12")
wgeks(milk, start="2019-01", end="2019-08",window=10) wgeks(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral weighted GEKS price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
wgeks_fbew(data, start, end)
wgeks_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS price index (the weighted GEKS index based on the Fisher formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
wgeks_fbew(milk, start="2018-12", end="2019-08")
wgeks_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral weighted GEKS price index extended by using the FBMW (Fixed Base Moving Window) method.
wgeks_fbmw(data, start, end)
wgeks_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS price index (the weighted GEKS index based on the Fisher formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
wgeks_fbmw(milk, start="2019-12", end="2020-04")
wgeks_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral weighted GEKS price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
wgeks_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
wgeks_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral weighted GEKS price index (the weighted GEKS index based on the Fisher formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
wgeks_splice(milk, start="2018-12", end="2020-02",splice="half")
wgeks_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral weighted WGEKS-AQI price index (to be more precise: the weighted GEKS index based on the asynchronous quality adjusted price index formula).
wgeksaqi(data, start, end, wstart = start, window = 13)
wgeksaqi(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral weighted WGEKS-AQI price index (to be more precise: the weighted GEKS index based on the asynchronous quality adjusted price index formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
wgeksaqi(milk, start="2019-01", end="2019-08",window=10) wgeksaqi(milk, start="2018-12", end="2019-12")
wgeksaqi(milk, start="2019-01", end="2019-08",window=10) wgeksaqi(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral weighted GEKS-AQI price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
wgeksaqi_fbew(data, start, end)
wgeksaqi_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS-AQI price index (the weighted GEKS index based on the asynchronous quality adjusted price index formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
wgeksaqi_fbew(milk, start="2018-12", end="2019-08")
wgeksaqi_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral weighted GEKS-AQI price index extended by using the FBMW (Fixed Base Moving Window) method.
wgeksaqi_fbmw(data, start, end)
wgeksaqi_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS-AQI price index (the GEKS index based on the asynchronous quality adjusted price index formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
wgeksaqi_fbmw(milk, start="2019-12", end="2020-04")
wgeksaqi_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral weighted GEKS-AQI price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
wgeksaqi_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
wgeksaqi_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral weighted GEKS-AQI price index (the weighted GEKS index based on the asynchronous quality adjusted price index formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
wgeksaqi_splice(milk, start="2018-12", end="2020-02",splice="half")
wgeksaqi_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral weighted WGEKS-AQU price index (to be more precise: the weighted GEKS index based on the asynchronous quality adjusted unit value formula).
wgeksaqu(data, start, end, wstart = start, window = 13)
wgeksaqu(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral weighted WGEKS-AQU price index (to be more precise: the weighted GEKS index based on the asynchronous quality adjusted unit value formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
wgeksaqu(milk, start="2019-01", end="2019-08",window=10) wgeksaqu(milk, start="2018-12", end="2019-12")
wgeksaqu(milk, start="2019-01", end="2019-08",window=10) wgeksaqu(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral weighted GEKS-AQU price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
wgeksaqu_fbew(data, start, end)
wgeksaqu_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS-AQU price index (the weighted GEKS index based on the asynchronous quality adjusted unit value formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
wgeksaqu_fbew(milk, start="2018-12", end="2019-08")
wgeksaqu_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral weighted GEKS-AQU price index extended by using the FBMW (Fixed Base Moving Window) method.
wgeksaqu_fbmw(data, start, end)
wgeksaqu_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS-AQU price index (the GEKS index based on the asynchronous quality adjusted unit value formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
wgeksaqu_fbmw(milk, start="2019-12", end="2020-04")
wgeksaqu_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral weighted GEKS-AQU price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
wgeksaqu_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
wgeksaqu_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral weighted GEKS-AQU price index (the weighted GEKS index based on the asynchronous quality adjusted unit value formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2023). Quality adjusted GEKS-type indices for price comparisons based on scanner data. Statistics in Transition – new series, 24(3), 151-169.
wgeksaqu_splice(milk, start="2018-12", end="2020-02",splice="half")
wgeksaqu_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral weighted WGEKS-GAQI price index (to be more precise: the weighted GEKS index based on the geometric asynchronous quality adjusted price index formula).
wgeksgaqi(data, start, end, wstart = start, window = 13)
wgeksgaqi(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral weighted WGEKS-GAQI price index (to be more precise: the weighted GEKS index based on the geometric asynchronous quality adjusted price index formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
wgeksgaqi(milk, start="2019-01", end="2019-08",window=10) wgeksgaqi(milk, start="2018-12", end="2019-12")
wgeksgaqi(milk, start="2019-01", end="2019-08",window=10) wgeksgaqi(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral weighted GEKS-GAQI price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
wgeksgaqi_fbew(data, start, end)
wgeksgaqi_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS-GAQI price index (the weighted GEKS index based on the geometric asynchronous quality adjusted price index formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
wgeksgaqi_fbew(milk, start="2018-12", end="2019-08")
wgeksgaqi_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral weighted GEKS-GAQI price index extended by using the FBMW (Fixed Base Moving Window) method.
wgeksgaqi_fbmw(data, start, end)
wgeksgaqi_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS-GAQI price index (the GEKS index based on the geometric asynchronous quality adjusted price index formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
wgeksgaqi_fbmw(milk, start="2019-12", end="2020-04")
wgeksgaqi_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral weighted GEKS-GAQI price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
wgeksgaqi_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
wgeksgaqi_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral weighted GEKS-GAQI price index (the weighted GEKS index based on the geometric asynchronous quality adjusted price index formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
wgeksgaqi_splice(milk, start="2018-12", end="2020-02",splice="half")
wgeksgaqi_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral weighted WGEKS-GL price index (to be more precise: the weighted GEKS index based on the geometric Laspeyres formula).
wgeksgl(data, start, end, wstart = start, window = 13)
wgeksgl(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral weighted WGEKS-GL price index (to be more precise: the weighted GEKS index based on the geometric Laspeyres formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
wgeksgl(milk, start="2019-01", end="2019-08",window=10) wgeksgl(milk, start="2018-12", end="2019-12")
wgeksgl(milk, start="2019-01", end="2019-08",window=10) wgeksgl(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral weighted GEKS-GL price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
wgeksgl_fbew(data, start, end)
wgeksgl_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS-GL price index (the weighted GEKS index based on the geometric Laspeyres formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
wgeksgl_fbew(milk, start="2018-12", end="2019-08")
wgeksgl_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral weighted GEKS-GL price index extended by using the FBMW (Fixed Base Moving Window) method.
wgeksgl_fbmw(data, start, end)
wgeksgl_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS-GL price index (the GEKS index based on the geometric Laspeyres formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
wgeksgl_fbmw(milk, start="2019-12", end="2020-04")
wgeksgl_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral weighted GEKS-GL price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
wgeksgl_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
wgeksgl_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral weighted GEKS-GL price index (the weighted GEKS index based on the geometric Laspeyres formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
wgeksgl_splice(milk, start="2018-12", end="2020-02",splice="half")
wgeksgl_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value of the multilateral weighted WGEKS-L price index (to be more precise: the weighted GEKS index based on the Laspeyres formula).
wgeksl(data, start, end, wstart = start, window = 13)
wgeksl(data, start, end, wstart = start, window = 13)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
wstart |
The beginning of the time interval (which is used by multilateral methods) limited to the year and month, e.g. "2020-01". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
This function returns a value of the multilateral weighted WGEKS-L price index (to be more precise: the weighted GEKS index based on the Laspeyres formula) which considers the time window defined by wstart
and window
parameters. It measures the price dynamics by comparing period end
to period start
(both start
and end
must be inside the considered time window). 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
wgeksl(milk, start="2019-01", end="2019-08",window=10) wgeksl(milk, start="2018-12", end="2019-12")
wgeksl(milk, start="2019-01", end="2019-08",window=10) wgeksl(milk, start="2018-12", end="2019-12")
This function returns a value of the multilateral weighted GEKS-L price index extended by using the FBEW (Fixed Base Monthly Expanding Window) method.
wgeksl_fbew(data, start, end)
wgeksl_fbew(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS-L price index (the weighted GEKS index based on the Laspeyres formula) extended by using the FBEW (Fixed Base Monthly Expanding Window) method. The FBEW method uses a time window with a fixed base month every year (December). The window is enlarged every month with one month in order to include information from a new month. The full window length (13 months) is reached in December of each year. The function measures the price dynamics between periods end
and start
. The month of the start
parameter must be December. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Chessa, A.G. (2016). A New Methodology for Processing Scanner Data in the Dutch CPI. Eurona 1/2016, 49-69.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
wgeksl_fbew(milk, start="2018-12", end="2019-08")
wgeksl_fbew(milk, start="2018-12", end="2019-08")
This function returns a value of the multilateral weighted GEKS-L price index extended by using the FBMW (Fixed Base Moving Window) method.
wgeksl_fbmw(data, start, end)
wgeksl_fbmw(data, start, end)
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
This function returns a value of the multilateral weighted GEKS-L price index (the GEKS index based on the Laspeyres formula) extended by using the FBMW (Fixed Base Moving Window) method. It measures the price dynamics between periods end
and start
and it uses a 13-month time window with a fixed base month taken as year(end)-1
. If the distance between end
and start
exceeds 13 months, then internal Decembers play a role of chain-linking months. The month of the start
parameter must be December. 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).
Gini, C. (1931). On the Circular Test of Index Numbers. Metron 9:9, 3-24.
Elteto, O., and Koves, P. (1964). On a Problem of Index Number Computation Relating to International Comparisons. Statisztikai Szemle 42, 507-518.
Szulc, B. (1983). Linking Price Index Numbers. In: Price Level Measurement, W. E. Diewert and C. Montmarquette (eds.), 537-566.
Lamboray, C.(2017). The Geary Khamis index and the Lehr index: how much do they differ? Paper presented at the 15th Ottawa Group meeting, 10-12 May 2017, Elville am Rhein, Germany.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
wgeksl_fbmw(milk, start="2019-12", end="2020-04")
wgeksl_fbmw(milk, start="2019-12", end="2020-04")
This function returns a value (or values) of the multilateral weighted GEKS-L price index extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
).
wgeksl_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
wgeksl_splice( data, start, end, window = 13, splice = "movement", interval = FALSE )
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-12". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
window |
The length of the time window (as positive integer: typically multilateral methods are based on the 13-month time window). |
splice |
A character string indicating the splicing method. Available options are: "movement", "window","half","mean", "window_published","half_published","mean_published". |
interval |
A logical value indicating whether the function is to provide the price index comparing the research period defined by |
This function returns a value or values (depending on interval
parameter) of the multilateral weighted GEKS-L price index (the weighted GEKS index based on the Laspeyres formula) extended by using window splicing methods. Available splicing methods are: movement splice, window splice, half splice, mean splice and their additional variants: window splice on published indices (WISP), half splice on published indices (HASP) and mean splice on published indices (see References
). The time window starts in start
and should consist of at least two months. 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).
Chessa, A. G. (2019). A Comparison of Index Extension Methods for Multilateral Methods. Paper presented at the 16th Meeting of the Ottawa Group on Price Indices, 8-10 May 2019, Rio de Janeiro, Brazil.
de Haan, J., van der Grient, H.A. (2011). Eliminating chain drift in price indexes based on scanner data. Journal of Econometrics, 161, 36-46.
Krsinich, F. (2014). The FEWS Index: Fixed Effects with a Window Splice? Non-Revisable Quality-Adjusted Price Indices with No Characteristic Information. Paper presented at the UNECE-ILO Meeting of the Group of Experts on Consumer Price Indices, 2-4 May 2016, Geneva, Switzerland.
de Haan, J.(2015). A Framework for Large Scale Use of Scanner Data in the Dutch CPI. Paper presented at the 14th Ottawa Group meeting, Tokyo, Japan.
Diewert, W.E., and Fox, K.J. (2017). Substitution Bias in Multilateral Methods for CPI Construction using Scanner Data. Discussion paper 17-02, Vancouver School of Economics, The University of British Columbia, Vancouver, Canada.
Białek, J. (2022). The general class of multilateral indices and its two special cases. Paper presented at the 17th Meeting of the Ottawa Group on Price Indices, Rome, Italy.
Białek, J. (2022). Improving quality of the scanner CPI: proposition of new multilateral methods, Quality & Quantity, https://doi.org/10.1007/s11135-022-01506-6.
wgeksl_splice(milk, start="2018-12", end="2020-02",splice="half")
wgeksl_splice(milk, start="2018-12", end="2020-02",splice="half")
This function returns a value (or vector of values) of the bilateral Young price index.
young(data, start, end, base = start, interval = FALSE)
young(data, start, end, base = start, interval = FALSE)
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. "2020-03". |
end |
The research period (as character) limited to the year and month, e.g. "2020-04". |
base |
The prior period used in the Young price index formula (as character) limited to the year and month, e.g. "2020-01" |
interval |
A logical value indicating whether the function is to compare the research period defined by |
The function returns a value (or vector of values) of the bilateral Young price index depending on the interval
parameter. 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).
Young, A. H. (1992). Alternative Measures of Change in Real Output and Prices. Survey of Current Business, 72, 32-48.
(2004). Consumer Price Index Manual. Theory and practice. ILO/IMF/OECD/UNECE/Eurostat/The World Bank, International Labour Office (ILO), Geneva.
young(sugar, start="2019-01", end="2020-01",base="2018-12") young(milk, start="2018-12", end="2020-01", interval=TRUE)
young(sugar, start="2019-01", end="2020-01",base="2018-12") young(milk, start="2018-12", end="2020-01", interval=TRUE)