HCR | R Documentation |
This function calculates the head count ratio.
HCR(predicate, weight = NULL, p = 0.5, q = 0.6, poverty.line = NULL)
predicate |
A numeric vector of a predicate variable (i.e. income or expenditure) |
weight |
A numeric vector of sampling weights. if NULL simple random sampling weights will be used |
p |
The quantile to be calculated from the predicate variable. Default is the median |
q |
The percentage of the quantile to be used in determining the poverty line. default is 0.6 |
poverty.line |
The poverty line. If it is NULL it is estimated from data. |
The head count ration is defined as the sum of the sampling weight of statistical units whose vale of the predicate variable is below the poverty line. The poverty line is usually defined as a fraction of a weighted quantile (in official statistics the median) of the predicate distribution
A list containing the classification of the units as poor (TRUE) and not-poor (FALSE), the estimated Head Count Ratio, and the poverty line
N <- 100
p <- 0.5
q <- 0.6
predicate <- rchisq(N, 15) # predicate variable
HCR(predicate)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.