quintile_ppi: Group population by quintiles based on their poverty...

Description Usage Arguments Value Examples

View source: R/05-quintile_ppi.R

Description

Group population by quintiles based on their poverty probability

Usage

1
quintile_ppi(ppi, probs = c(0.2, 0.4, 0.6, 0.8, 1))

Arguments

ppi

A numeric vector of poverty probabilities or likelihoods.

probs

A numeric vector between 0 to 1 of quantile probabilities. Default values are a vector of equal probabilities (0.2, 0.4, 0.6, 0.8, 1).

Value

A numeric vector between 1 to 5 classifying data into quintiles of increasing poverty probabilities.

Examples

1
2
3
4
5
6
# ppi based on USAID extreme poverty definition using Bangladesh data from
# washdata package and PPI lookup table from ppitables package
# install.packages("washdata"); library(washdata)
ppi <- get_ppi_cohort(index = washdata::indicatorsDataBGD$ppi,
                      ppiTable = ppitables::ppiBGD2013)
quintile_ppi(ppi = ppi$extreme)

ernestguevarra/ppicalc documentation built on Jan. 14, 2020, 2:49 a.m.