ebp_report_byrank {povmap} | R Documentation |
Produce EBP Head Count Population/Rate by Rank
Description
This function combines the ebp object with the census data to produce report tables that rank head count estimates either by population of poor or the head count rates themselves in descending order. The function allows the user to select the first/last "x" number of areas by name as well.
Usage
ebp_report_byrank(
model,
pop_data,
pop_domains,
pop_weights = NULL,
byrank_indicator = "count",
number_to_list = NULL,
head = TRUE,
indicator = "Head_Count"
)
Arguments
model |
an object returned by the ebp function of type "emdi ebp". |
pop_data |
the population/census/training data |
pop_domains |
a character string containing the name of a variable that
indicates domains in the population data. The variable can be numeric or a
factor but needs to be of the same class as the variable named in
|
pop_weights |
a character string containing the name of a variable that
indicates population weights in the populatation data. If a character string
is provided weighted indicators are estimated using population weights.
The variable has to be numeric. Defaults to |
byrank_indicator |
if argument is "count", the function ranks the product of Head_Count (from object of class 'ebp') and 'pop_weights', otherwise it the function simply ranks Head_Count output within 'ebp' object |
number_to_list |
an integer, the first 'number_to_list' number of target areas to produce from 'byrank_indicator' ordering. |
head |
a logical, if 'TRUE' the top 'number_to_list' results will be returned and if 'FALSE' the bottom 'number_to_list' will be returned |
indicator |
a character string containing the name of the indicator to rank. Defaults to "Head_Count" |
Value
dataframe containing population size, head count values and counts of poor population
Examples
data("eusilcA_pop")
data("eusilcA_smp")
ebp_model <- ebp(
fixed = eqIncome ~ gender + eqsize + cash + self_empl +
unempl_ben + age_ben + surv_ben + sick_ben + dis_ben + rent + fam_allow +
house_allow + cap_inv + tax_adj,
pop_data = eusilcA_pop, pop_domains = "district",
smp_data = eusilcA_smp, smp_domains = "district", L = 2,
weights = "weight", weights_type = "nlme", na.rm = TRUE,
pop_weights = "hhsize")
# full data of highest population below threshold by rank (descending order)
ebp_report_byrank(model = ebp_model,
pop_data = eusilcA_pop,
pop_domains = "district",
pop_weights = "hhsize")
# full data of highest rate below threshold by rank (descending order)
ebp_report_byrank(model = ebp_model,
pop_data = eusilcA_pop,
pop_domains = "district",
pop_weights = "hhsize",
byrank_indicator = "rate")
# bottom 10 poverty count below threshold by rank (in ascending order)
ebp_report_byrank(model = ebp_model,
pop_data = eusilcA_pop,
pop_domains = "district",
pop_weights = "hhsize",
number_to_list = 10,
head = FALSE)