Derivation
num_children is derived directly from the individual-level file indata_wb_Eng. By grouping all records by ID00 (household serial number), we count every person whose age (D6) is less than 18. In R, this was implemented as:
indata_wb_Eng %>%
group_by(ID00) %>%
summarise(num_children = sum(D6 < 18))