
Add Skilled Birth Attendance to Individual Data
Source:R/add_loop_skilled_birth_attendance.R
add_loop_skilled_birth_attendance.RdComputes two binary variables at the individual level for women of reproductive age (15–49): whether the woman had a live birth in the last two years, and whether that birth was attended by skilled health personnel (doctor, nurse, or midwife).
For ANA flagging, use the individual-level
health_ind_skilled_birth_attendance_d (percentage of women with a live birth
attended by skilled personnel). The household counts returned by
add_loop_skilled_birth_attendance_to_main() are for triangulation only and
are not the ANA flagging input.
Aggregates individual-level skilled birth attendance indicators to the household level by summing the binary dummy variables per household. A member whose birth assistance or live-birth status is unknown is excluded from the counts (health_ind_skilled_birth_attendance_known_n and health_ind_skilled_birth_attendance_n, and health_ind_live_birth_2years_n for an unknown live-birth status), so an undefined answer neither counts as non-skilled nor blanks the household figures.
These household aggregates are for triangulation only. ANA flagging uses the
individual-level health_ind_skilled_birth_attendance_d column.
Usage
add_loop_skilled_birth_attendance(
loop,
ind_gender = "ind_gender",
ind_gender_female = "female",
ind_age = "ind_age",
ind_age_min = 15,
ind_age_max = 49,
health_pregnancy_2years_yn = "health_pregnancy_2years_yn",
health_pregnancy_2years_yes = "yes",
health_pregnancy_2years_no = "no",
health_pregnancy_2years_undefined = c("dnk", "pnta"),
health_birth_assistance = "health_birth_assistance",
health_birth_assistance_skilled = c("doctor", "nurse", "midwife"),
health_birth_assistance_lessskilled = c("traditional_birth_attendant",
"relative_friend", "no_one"),
health_birth_assistance_undefined = c("dnk", "pnta", "other")
)
add_loop_skilled_birth_attendance_to_main(
main,
loop,
ind_live_birth_2years = "health_ind_live_birth_2years_d",
ind_skilled_birth_attendance = "health_ind_skilled_birth_attendance_d",
id_col_main = "uuid",
id_col_loop = "uuid"
)Arguments
- loop
A data frame of individual-level data (output of
add_loop_skilled_birth_attendance()).- ind_gender
Column name for the gender of the individual.
- ind_gender_female
Response code for female.
- ind_age
Column name for the age of the individual.
- ind_age_min
Minimum age for reproductive age range (inclusive). Default:
15.- ind_age_max
Maximum age for reproductive age range (inclusive). Default:
49.- health_pregnancy_2years_yn
Column name for whether the woman had a live birth in the last two years.
- health_pregnancy_2years_yes
Response code for yes.
- health_pregnancy_2years_no
Response code for no.
- health_pregnancy_2years_undefined
Character vector of undefined response codes (dnk, pnta).
- health_birth_assistance
Column name for who assisted with the delivery.
- health_birth_assistance_skilled
Character vector of response codes for skilled health personnel (doctor, nurse, or midwife).
- health_birth_assistance_lessskilled
Character vector of response codes for less-skilled birth assistance (traditional birth attendant, relative/friend, or none).
- health_birth_assistance_undefined
Character vector of undefined response codes (dnk, pnta, other).
- main
A data frame of household-level data.
- ind_live_birth_2years
Column name for the live birth dummy in loop.
- ind_skilled_birth_attendance
Column name for the skilled birth attendance dummy in loop.
- id_col_main
Column name for the unique identifier in the main data frame.
- id_col_loop
Column name for the unique identifier in the loop data frame.
Value
A data frame with three additional columns:
health_ind_gender_female_above_age_d:1Lif the individual is female and aged betweenind_age_minandind_age_max(inclusive);0Lif not;NA_integer_if gender or age is missing.health_ind_live_birth_2years_d:1Lif woman aged 15–49 with a live birth in the last two years;0Lotherwise (including men and women outside age range);NA_integer_if age/gender missing or pregnancy response is undefined.health_ind_skilled_birth_attendance_d:1Lif live birth and attended by skilled personnel;0Lif live birth and not attended by skilled personnel;NA_integer_if no live birth, birth assistance response is undefined, or live birth status is NA.
A data frame with three additional columns:
health_ind_live_birth_2years_n: Count of women aged 15–49 with a live birth in the last two years per household; a member whose live-birth status is unknown is excluded;0for households absent fromloop.health_ind_skilled_birth_attendance_known_n: Denominator for the skilled birth attendance indicator: count of live births with a defined birth assistance answer (skilled or less-skilled) per household. Members with an unknown assistance answer or live-birth status are excluded;0for households absent fromloop.health_ind_skilled_birth_attendance_n: Numerator for the skilled birth attendance indicator: count of live births attended by skilled personnel per household. Members with an unknown assistance answer or live-birth status are excluded;0for households absent fromloop.