Skip to contents

Compute poverty and distributional statistics for microdata.

Usage

prod_compute_pip_stats(
  welfare,
  povline,
  population = NULL,
  requested_mean = NULL,
  svy_mean_lcu = NULL,
  svy_median_lcu,
  svy_median_ppp,
  popshare = NULL,
  default_ppp,
  ppp = NULL,
  p0 = 0.5,
  distribution_type = c("micro", "group", "aggregate", "imputed")
)

Arguments

welfare

numeric: A vector of income or consumption values

povline

numeric: Poverty line in international dollars

population

numeric: A vector of population weights, optional, a vector of 1s if not specified.

requested_mean

numeric: Welfare mean in international dollars

svy_mean_lcu

numeric: Welfare mean in Local Currency Unit

svy_median_lcu

numeric: Welfare median in Local Currency Unit

svy_median_ppp

numeric: Welfare median in PPP

popshare

numeric: Share of population for which the corresponding quantile is desired. Default .5 (i.e., weighted median)

default_ppp

numeric: Default purchasing power parity

ppp

numeric: PPP requested by user

p0

numeric: TO be documented

distribution_type

character: Type of distribution, either micro, group, aggregate or imputed.

Value

list

Details

Version used in production. Does not re-compute all distributional stats. Distributional stats are pre-computed as they are not sensitive to the poverty line.