Skip to contents

This function calculates a health composite score based on healthcare access and needs. It considers whether individuals needed healthcare, whether they accessed it if needed, and optionally takes into account disability status. The function then determines if a household is in need or in acute need of health assistance based on the calculated score.

Prerequisite functions:

  • add_loop_healthcare_needed_cat.R

  • add_loop_wgq_ss.R - if WG-SS data collected

Usage

add_comp_health(
  df,
  ind_healthcare_needed_no_n = "health_ind_healthcare_needed_no_n",
  ind_healthcare_needed_yes_unmet_n = "health_ind_healthcare_needed_yes_unmet_n",
  ind_healthcare_needed_yes_met_n = "health_ind_healthcare_needed_yes_met_n",
  wgq_dis = FALSE,
  ind_healthcare_needed_no_wgq_dis_n = "health_ind_healthcare_needed_no_wgq_dis_n",
  ind_healthcare_needed_yes_unmet_wgq_dis_n =
    "health_ind_healthcare_needed_yes_unmet_wgq_dis_n",
  ind_healthcare_needed_yes_met_wgq_dis_n =
    "health_ind_healthcare_needed_yes_met_wgq_dis_n"
)

Arguments

df

A data frame.

ind_healthcare_needed_no_n

Column name for the number of individuals who did not need to access healthcare.

ind_healthcare_needed_yes_unmet_n

Column name for the number of individuals who needed to access healthcare but did not.

ind_healthcare_needed_yes_met_n

Column name for the number of individuals who needed to access healthcare and did.

wgq_dis

Logical. If TRUE, the function will consider the disability columns.

ind_healthcare_needed_no_wgq_dis_n

Column name for the number of individuals who did not need to access healthcare and have a disability.

ind_healthcare_needed_yes_unmet_wgq_dis_n

Column name for the number of individuals who needed to access healthcare but did not and have a disability.

ind_healthcare_needed_yes_met_wgq_dis_n

Column name for the number of individuals who needed to access healthcare and did and have a disability.

Value

A data frame with additional columns:

  • comp_health_score: Health composite score (1-4)

  • comp_health_in_need: Binary indicator for being in need of health assistance

  • comp_health_in_acute_need: Binary indicator for being in acute need of health assistance