pq6: Sample price/quantity data

Description Usage Format Note Source Examples

Description

Prices and quantities for six products over five periods.

Usage

1
2

Format

Each data frame has 6 rows and 5 columns, with each row corresponding to a product and each column corresponding to a time period.

Note

Adapted from tables 3.1 and 3.2 in Balk (2008), which were adapted from tables 19.1 and 19.2 in the PPI manual.

Source

Balk, B. M. (2008). Price and Quantity Index Numbers. Cambridge University Press.

ILO, IMF, OECD, Eurostat, UN, and World Bank. (2004). Producer Price Index Manual: Theory and Practice. International Monetary Fund.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Recreate table 3.6 from Balk (2008)

index_formulas <- function(p1, p0, q1, q0) {
  c(fisher = index_fisher(p1, p0, q1, q0),
    tornqvist = index_geometric("Tornqvist")(p1, p0, q1, q0),
    marshall_edgeworth = index_arithmetic("MarshallEdgeworth")(p1, p0, q1, q0),
    walsh1 = index_arithmetic("Walsh1")(p1, p0, q1, q0)
  )
}

round(t(mapply(index_formulas, price6, price6[1], quantity6, quantity6[1])), 4)

gpindex documentation built on Feb. 3, 2021, 1:06 a.m.