View source: R/prod_gd_compute_pip_stats_lq.R
prod_gd_compute_pip_stats_lq | R Documentation |
Compute poverty statistics for grouped data using the quadratic functional form of the Lorenz curve.
prod_gd_compute_pip_stats_lq(
welfare,
povline,
population,
requested_mean,
popshare = NULL,
default_ppp = NULL,
ppp = NULL,
p0 = 0.5
)
welfare |
numeric: Cumulative proportion of welfare held by that proportion of the population (Lorenz Curve). |
povline |
numeric: Poverty line. |
population |
numeric: Cumulative proportion of population. |
requested_mean |
numeric: Welfare mean. |
popshare |
numeric: Share of population living below the poverty line. Optional. |
default_ppp |
numeric: Default purchasing power parity. |
ppp |
numeric: PPP request by user. |
p0 |
numeric: TO BE DOCUMENTED. |
Version used in production.
list
# Set initial parameters
L <- c(
0.00208, 0.01013, 0.03122, 0.07083, 0.12808, 0.23498, 0.34887,
0.51994, 0.6427, 0.79201, 0.86966, 0.91277, 1
)
P <- c(
0.0092, 0.0339, 0.085, 0.164, 0.2609, 0.4133, 0.5497, 0.7196,
0.8196, 0.9174, 0.957, 0.9751, 1
)
mu <- 109.9 # mean
z <- 89 # poverty line
res <- wbpip:::prod_gd_compute_pip_stats_lq(
welfare = L,
population = P,
requested_mean = mu,
povline = z
)
res$headcount
res2 <- wbpip:::prod_gd_compute_pip_stats_lq(
welfare = L,
population = P,
requested_mean = mu,
popshare = res$headcount
)
res2$povline
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.