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_lq(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] 19.32239
#>
#> $z_max
#> [1] 130.4877
#>
#> $ppp
#> [1] 3.69
#>
#> $gini
#> [1] 0.3212646
#>
#> $median
#> [1] 42.24282
#>
#> $rmhalf
#> [1] 30.3349
#>
#> $polarization
#> [1] 0.2206622
#>
#> $ris
#> [1] 0.2941709
#>
#> $mld
#> [1] 0.1897891
#>
#> $dcm
#> [1] 34.9956
#>
#> $deciles
#> [1] 0.03745935 0.05010249 0.06009842 0.06896129 0.07754930 0.08659087
#> [7] 0.09703444 0.11071236 0.13305853 0.27843295
#>
#> $headcount
#> [1] 0.7601359
#>
#> $poverty_gap
#> [1] 0.2762329
#>
#> $poverty_severity
#> [1] 0.1283636
#>
#> $eh
#> [1] -0.8715094
#>
#> $epg
#> [1] -1.751794
#>
#> $ep
#> [1] -2.303913
#>
#> $gh
#> [1] -0.09397473
#>
#> $gpg
#> [1] 0.7032745
#>
#> $gp
#> [1] 1.53591
#>
#> $watts
#> [1] 0.3909738
#>
#> $dl
#> [1] 1.120862
#>
#> $ddl
#> [1] 1.691956
#>
#> $is_normal
#> [1] TRUE
#>
#> $is_valid
#> [1] TRUE
#>
#> $sse
#> [1] 0.003221566
#>
#> $ssez
#> [1] 0.003221566
#>
#> $ymean
#> [1] 0.09219419
#>
#> $sst
#> [1] 0.08792027
#>
#> $coef
#> [1] 0.7959815 -1.4445934 0.1472819
#>
#> $sse
#> [1] 8.003335e-07
#>
#> $r2
#> [1] 0.9999909
#>
#> $mse
#> [1] 1.333889e-07
#>
#> $se
#> [1] 0.00550664 0.02284612 0.01526564