/* IMPORT THE CHILDREN'S RECODE (Stata file): MWKR7HFL Malawi: Standard DHS, 2015-16 */ PROC IMPORT DATAFILE="...\MWKR7HFL" DBMS=DTA OUT=WORK.MALAWI_DHS_15 REPLACE; RUN; DATA BOTTLE_FEEDING; SET WORK.MALAWI_DHS_15; weight = (v005/1000000); strata = v023; psu = v021; child_age = b19; IF child_age <24 & b5=1; FORMAT BOTTLE $6. place_delivery $17. skilled_birth $30.; /** CHILD AGE GROUPS IN MONTHS **/ IF child_age in(0:1) THEN child_age_grp = "00-01"; IF child_age in(2:3) THEN child_age_grp = "02-03"; IF child_age in(4:5) THEN child_age_grp = "04-05"; IF child_age in(6:8) THEN child_age_grp = "06-08"; IF child_age in(9:11) THEN child_age_grp = "09-11"; IF child_age in(12:17) THEN child_age_grp = "12-17"; IF child_age in(18:23) THEN child_age_grp = "18-23"; *IF child_age not in(0:23) THEN child_age_grp = .; LABEL child_age_grp = "Age group of child in months"; /** IF CHILD WAS EVER BOTTLE FED **/ IF m38 in(1) THEN bottle="1. Yes"; IF m38 not in(1) THEN bottle="0. No"; LABEL bottle = "Percentage using a bottle with a nipple?"; /** DELIVERY CARE **/ IF M15 in(21:36) THEN place_delivery="1. Health facility"; IF M15 in(11:12) THEN place_delivery="2. At home"; IF M15 not in(11:12,21:36) THEN place_delivery="3. Other/Missing"; LABEL place_delivery = "Place of delivery"; /** SKILLED BIRTH ATTENDANT **/ *IF m3a = 1 OR m3b = 1 = 1 THEN skilled = 1; *else *IF m3a OR m3b NE 1 THEN skilled = 0; skilled_birth1=3; IF m3a=1 OR m3b=1 THEN skilled_birth1=1; IF m3g=1 AND m3b NE 1 THEN skilled_birth1=2; IF m3n=1 THEN skilled_birth1=4; IF skilled_birth1=1 THEN skilled_birth="1. Health professional"; IF skilled_birth1=2 THEN skilled_birth="2. Traditional birth attendant"; IF skilled_birth1=3 THEN skilled_birth="3. Other"; IF skilled_birth1=4 THEN skilled_birth="4. No one"; LABEL skilled_birth = "Type of attendant at birth"; PROC TEMPLATE; EDIT BASE.FREQ.CROSSTABFREQS; EDIT FREQUENCY; FORMAT=BEST12.; END; END; RUN; PROC FREQ DATA=WORK.BOTTLE_FEEDING; WEIGHT weight; *TABLE bottle place_delivery skilled_birth1 skilled_birth; TABLE child_age_grp * bottle /NOCOL NOROW NOPERCENT; RUN;