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) 
countryeksccdgk
Senegal2.4422.4382.229
Botswana3.6583.6763.283
Honduras4.0794.0513.663
El Salvador4.8044.8244.403
Philippines5.8915.9075.184
Korea6.6796.8346.429
Paraguay7.5767.5546.687
Finland22.08922.00019.351
Austria26.63626.60723.267
Canada34.17134.03329.280