index_paasche() in OECDsppps calculates the matrix of Paasche indices. It
returns a data frame containing the base region, region, and the respective indices;
see Details and
World Bank (2013)
,
for more information.
Usage
index_paasche(
data,
region = "region",
product = "product",
ppp_bh = "ppp_bh",
exp_wght = "exp_wght",
data_check_output = "truncated"
)Arguments
- data
A data frame or tibble containing at least four columns identifying region, product, subnational PPPs, and expenditure weights. The data is checked using
valid_index_data()prior to index calculation.- region
Identifier for regions
- product
Product identifier
- ppp_bh
Identifier for subnational PPPs
- exp_wght
Identifier for expenditure weights
- data_check_output
controls the length of the possible error messages generated by
valid_index_data()during the input data check. Default "truncated" might not list all problematic region/heading pairs. Under "full", the function increases the length of the warning message, so that all problematic region/heading pairs are printed.
Details
Paasche index for regions \(j\) and \(k\) is obtained as \[sPPP_P^{j,k} = \frac{1}{\sum_{n=1}^{N} \frac{w_n^k}{sPPP_n^{j,k}}}\] which is a weighted average of the subnational PPPs of region \(j\) to region \(k\) across the \(N\) basic headings using region \(k\) weights.
The function returns a data frame containing the following variables: 'base_region' (region j), 'region' (region k), 'paasche_index' (final indices).
References
World Bank (2013). Measuring the Real Size of the World Economy: The Framework, Methodology, and Results of the International Comparison Program — ICP. World Bank. doi:10.1596/978-0-8213-9728-2 .
Examples
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(tibble))
tibble(
region = c("region A", "region A", "region B", "region B"),
product = c("product 1", "product 2", "product 1", "product 2"),
ppp_bh = c(0.5, 0.7, 0.6, 0.9),
exp_wght = c(0.5, 0.5, 0.6, 0.4)
) |>
index_paasche()
#> # A tibble: 4 × 3
#> base_region region paasche_index
#> <chr> <chr> <dbl>
#> 1 region A region A 1
#> 2 region A region B 1.23
#> 3 region B region A 0.805
#> 4 region B region B 1
