Skip to contents

add_loop_edu_barrier_protection_d adds a dummy variable to the individual-level data frame for all school-aged children, taking 1 if the child faces a protection barrier and 0 otherwise. add_loop_edu_barrier_protection_d_to_main aggregates the dummy variable to the household-level data frame.

Usage

add_loop_edu_barrier_protection_d(
  loop,
  barriers = "edu_barrier",
  protection_issues = c("protection_at_school", "protection_travel_school",
    "child_work_home", "child_work_outside", "child_armed_group", "child_marriage",
    "ban", "enroll_lack_documentation", "discrimination"),
  ind_schooling_age_d = "edu_ind_schooling_age_d"
)

add_loop_edu_barrier_protection_d_to_main(
  main,
  loop,
  ind_barrier_protection_d = "edu_ind_barrier_protection_d",
  id_col_main = "uuid",
  id_col_loop = "uuid"
)

Arguments

loop

A data frame of individual-level data for the loop.

barriers

Column name for the child protection barrier category.

protection_issues

Vector of protection issues RESPONSE CODES.

ind_schooling_age_d

Column name for the dummy variable of schooling age.

main

A data frame of household-level data.

ind_barrier_protection_d

Column name for the dummy variable of the child protection barrier category.

id_col_main

Column name for the unique identifier in the main dataset.

id_col_loop

Column name for the unique identifier in the loop dataset.