1 min read

pppindexr

I have published an R package to github. It provides functions to work with international comparisons of real incomes (Geary Khamis, EKS, and CCD real income indices).

See the website here: https://erikosorensen.github.io/pppindexr/index.html

Here is how it is installed:

# install.packages("devtools")
devtools::install_github("ErikOSorensen/pppindexr")

It comes with the Neary (2004) data installed, and here is how to calculate the three supplied indices for the 60 countries in Neary’s paper, listing six of the low income countries:

library(pppindexr)
P <- Neary2004 |> dplyr::select(p1:p11)
Q <- Neary2004 |> dplyr::select(q1:q11)
Neary2004$eks <- eks(P,Q)
Neary2004$gk <- ygk(P,Q,
                    pop = Neary2004$pop1980, 
                    min_scale = TRUE)
Neary2004$ccd <- ccd(P,Q)
Neary2004 |> dplyr::sample_n(10) |> 
  dplyr::select(country, eks, ccd, gk) |>
  dplyr::arrange(eks) |>
  knitr::kable(digits=3) 
country eks ccd gk
Senegal 2.442 2.438 2.229
Botswana 3.658 3.676 3.283
Honduras 4.079 4.051 3.663
El Salvador 4.804 4.824 4.403
Philippines 5.891 5.907 5.184
Korea 6.679 6.834 6.429
Paraguay 7.576 7.554 6.687
Finland 22.089 22.000 19.351
Austria 26.636 26.607 23.267
Canada 34.171 34.033 29.280