valid_est() in OECDsppps creates the "Expenditure Shares Table"
see World Bank (2013), ICP (2021) and European Union/OECD et al. (2024)
.
The function calculates the:
Maximum- Highest expenditure share based on expenditure shares by group as specified bygroup_by()Median- Median expenditure share based on expenditure shares by group as specified bygroup_by()Minimum- Lowest expenditure share based on expenditure shares by group as specified bygroup_by()max-median ratio testandmedian-min ratio test- see Details for more information All expenditure shares that do not pass the two tests are flagged in columnsMax-median ratio FLAGandMedian-min ratio FLAG, respectively#'
Details
Max-median ratio test: The ratio between the maximal and median observed expenditure shares
for product \(j\), \(w_j\). Basic headings where the maximal observed expenditure is more than 25 times
as big as the median are flagged in Max-median ratio FLAG:
\[max-median~ratio = max(w_j)/median(w_j)\]
Median-min ratio test: The ratio between the median and minimal observed expenditure shares
for product \(j\), \(w_j\). Basic headings where the median observed expenditure is more than 25 times
as big as the minimum are flagged in Median-min ratio FLAG:
\[median-min~ratio = median(w_j)/min(w_j)\]
References
European Union/OECD, Hearne D, Bailey D (2024).
Eurostat-OECD Methodological Manual on Purchasing Power Parities (2023 Edition), volume 12(1).
OECD Publishing, Paris.
doi:10.2785/384854
, https://doi.org/10.1080/21681376.2025.2475115.
ICP (2021).
“A Guide to the Compilation of Subnational Purchasing Power Parities (PPPs).”
International Comparison Program.
https://thedocs.worldbank.org/en/doc/5064f2288436664bc8f9811c8a5b8c55-0050022021/original/Guide-Subnational-PPPs.pdf.
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))
library(OECDsppps)
uk_hhe |>
group_by(coicop_4d) |>
valid_est(shares = 'expenditure_share')
#> # A tibble: 2 × 8
#> coicop_4d Maximum expenditure …¹ Median expenditure s…² Minimum expenditure …³
#> <chr> <dbl> <dbl> <dbl>
#> 1 01.1.1 14.7 8.38 2.80
#> 2 04.3.2 17.8 8.45 1.59
#> # ℹ abbreviated names: ¹`Maximum expenditure share`,
#> # ²`Median expenditure share`, ³`Minimum expenditure share`
#> # ℹ 4 more variables: `Max-median ratio` <dbl>, `Median-min ratio` <dbl>,
#> # `Max-median ratio FLAG` <lgl>, `Median-min ratio FLAG` <lgl>
