function that creates different composite indicators from hesper items for each type of hesper items (at least one item as serious problem from the category, number of items as serious problem from the category, proportion of items as serious problem from the category, overall proportion of items as serious problem from the category compared to all other items)
add_hesper_cat.Rd
naming done using the following syntax: nb_hesper_items_section_name.section_category
Usage
add_hesper_cat(
df,
list_group = list(aap = c("hesper_information", "hesper_aid"), education =
c("hesper_education"), fsl = c("hesper_food"), health = c("hesper_health",
"hesper_health_care_men", "hesper_health_care_women"), livelihood =
c("hesper_income_livelihood"), protection = c("hesper_distress", "hesper_safety",
"hesper_separation", "hesper_displaced", "hesper_respect", "hesper_movement",
"hesper_law", "hesper_gbv", "hesper_drug"), snfi = c("hesper_shelter",
"hesper_clothes_etc"), wash = c("hesper_drinking_water", "hesper_toilet",
"hesper_clean", "hesper_clean_women"), wellbeing = c("hesper_care", "hesper_support",
"hesper_time", "hesper_mental_health", "hesper_care_community")),
choice_serious = "serious_problem",
choice_no_serious = "no_serious_problem",
choice_dnk = "dnk",
choice_pnta = "pnta",
choice_na = "not_applicable"
)
Arguments
- df
dataframe containing the data
- list_group
named list with all HESPER items column names organized by category The argument must be a named list containing for each list element a vector with all columns names corresponding to the group category. The names of the list elements must be the name of the group category.
- choice_serious
value that indicates a serious problem
- choice_no_serious
value that indicates no serious problem
- choice_dnk
value that indicates do not know
- choice_pnta
value that indicates decline to answer
- choice_na
value that indicates not applicable to household
Value
dataframe with following new columns added: nb_hesper_items_section_name.section_category // prop_hesper_items_section_nae // hesper_items_section_nae
Details
The function creates the following indicators: nb_hesper_items_section_nae : number of items with serious problem reported in the corresponding section category prop_hesper_items_section_nae : proportion of items with serious problem reported in the corresponding section category relative to all items of this section category overall_prop_hesper_items_section_nae : overall proportion of items with serious problem in the corresponding section category compared to all items reported as serious problem at_least_one_hesper_item_section_nae : binary column indicating if at least one item with serious problem is reported in the corresponding section category