get_ppi_cohort: Get a cohort or sample of households' poverty probability...

Description Usage Arguments Value Examples

View source: R/02-get_ppi_cohort.R

Description

Get a cohort or sample of households' poverty probability based on each household's Poverty Probability Index (PPI) score. This function uses PPI lookup tables for 60 countries available via the ppitables package.

Usage

1
get_ppi_cohort(index, ppiTable)

Arguments

index

The households' PPI score of class numeric.

ppiTable

Name of country PPI table to use from the ppitables package

Value

A data frame of households' poverty probabilities based on various poverty metrics

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Apply function on a dataset from Bangladesh that includes PPI scores from
# the washdata package
## Not run: 
get_ppi_cohort(data = washdata::indicatorsDataBGD,
               index = "ppi",
               ppiTable = ppiBGD2013)

## End(Not run)

# Apply function on a dataset from Bangladesh but specifying vector for PPI
# and keeping data as NULL
#\dontrun{
get_ppi_cohort(index = washdata::indicatorsDataBGD$ppi,
               ppiTable = ppitables::ppiBGD2013)
#}

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