Skip to contents

Background

Povcalnet uses two methods to estimate poverty and inequality statistics from grouped data.
* One method is based on fitting a Lorenz Quadratic functional form to the grouped data
* the other one uses a Beta Lorenz function

This vignette focuses on the Lorenz Quadratic method.

High level example

# Input definition
welfare_mean    <- 51.56
ppp             <- 3.69
daily_povline   <- 1.9
monthly_povline <- daily_povline * 365 / 12

# Create grouped data (Type 1)
# http://iresearch.worldbank.org/povcalnet/PovCalculator.aspx
population <- c(0.0005,
                0.0032,
                0.014799999999999999,
                0.0443,
                0.0991,
                0.257,
                0.4385,
                0.5938,
                0.7089,
                1)

welfare <- c(5.824760527229386e-05,
             0.000604029410841011,
             0.0037949334793616948,
             0.013988878652244477,
             0.036992164583098786,
             0.12140708906131342,
             0.24531391873082081,
             0.37446670169288321,
             0.48753116241194566,
             1)


# Estimate poverty statistics
wbpip:::gd_compute_pip_stats_lb(welfare         = welfare,
                                population      = population,
                                requested_mean  = welfare_mean,
                                povline         = monthly_povline,
                                default_ppp     = ppp)
#> $mean
#> [1] 51.56
#> 
#> $poverty_line
#> [1] 57.79167
#> 
#> $z_min
#> [1] 13.70771
#> 
#> $z_max
#> [1] 142.2513
#> 
#> $ppp
#> [1] 3.69
#> 
#> $gini
#> [1] 0.3123674
#> 
#> $median
#> [1] 42.58973
#> 
#> $rmhalf
#> [1] 30.01057
#> 
#> $polarization
#> [1] 0.2556375
#> 
#> $ris
#> [1] 0.2910257
#> 
#> $mld
#> [1] 0.1633424
#> 
#> $dcm
#> [1] 35.45434
#> 
#> $deciles
#>  [1] 0.03750486 0.04963605 0.05871314 0.06775231 0.07741935 0.08831018
#>  [7] 0.10132911 0.11835493 0.14500187 0.25597820
#> 
#> $headcount
#> [1] 0.7184622
#> 
#> $poverty_gap
#> [1] 0.2714275
#> 
#> $poverty_severity
#> [1] 0.1293701
#> 
#> $eh
#> [1] -0.8806334
#> 
#> $epg
#> [1] -1.646977
#> 
#> $ep
#> [1] -2.196139
#> 
#> $gh
#> [1] -0.09495857
#> 
#> $gpg
#> [1] 0.7145769
#> 
#> $gp
#> [1] 1.547531
#> 
#> $watts
#> [1] 0.3788881
#> 
#> $dl
#> [1] 1.120948
#> 
#> $ddl
#> [1] 1.771549
#> 
#> $is_normal
#> [1] TRUE
#> 
#> $is_valid
#> [1] TRUE
#> 
#> $sse
#> [1] 2.263312e-05
#> 
#> $ssez
#> [1] 2.263312e-05
#> 
#> $ymean
#> [1] -3.45893
#> 
#> $sst
#> [1] 38.99352
#> 
#> $coef
#> [1] 0.5780372 0.9420509 0.5257860
#> 
#> $sse
#> [1] 0.001335919
#> 
#> $r2
#> [1] 0.9999657
#> 
#> $mse
#> [1] 0.0002226532
#> 
#> $se
#> [1] 0.015403736 0.003191951 0.017792248