GET STATA FILE='...\MWKR7HFL.DTA'. DATASET NAME DataSet2 WINDOW=FRONT. ****************************************************************************************************************************************************. COMPUTE weight = v005/1000000. COMPUTE strata = v023. COMPUTE psu = v021. WEIGHT BY weight. ***++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++***. COMPUTE child_age = b19. SELECT IF child_age <24 AND B5=1. RECODE child_age (0,1 = 1) (2,3 = 2) (4,5=3) (6,7,8=4) (9 thru 11 = 5) (12 thru 17=6) (18 thru 23=7) INTO child_age_grp. VARIABLE LABELS child_age_grpge "Age of child in months". VALUE LABELS child_age_grp 1"0-1" 2"2-3" 3"4-5" 4"6-8" 5"9-11" 6"12-17" 7"18-23". ****************************************************************************************************************************************************. /** IF CHILD WAS EVER BOTTLE FED **/. COMPUTE bottle = 0. IF M38=1 bottle = 1. EXECUTE. VALUE LABELS bottle 0 "No" 1 "Yes". VARIABLE LABELS bottle "Percentage using a bottle with a nipple?". /** DELIVERY CARE **/. RECODE M15 (21 THRU 36=1) (11 THRU 12=2) (ELSE=3) INTO place_delivery. VALUE LABELS place_delivery 1 "Health facility" 2 "At home" 3 "Other/Missing". VARIABLE LABELS place_delivery "Place of delivery". /** SKILLED BIRTH ATTENDANT **/. COMPUTE skilled_birth=3. IF m3a=1 OR m3b=1 skilled_birth=1. IF m3g=1 AND m3b NE 1 skilled_birth=2. IF m3n=1 skilled_birth=4. VALUE LABELS skilled_birth 1 "Health professional" 2 "Traditional birth attendant" 3 "Other" 4 "No one". VARIABLE LABELS skilled_birth "Type of attendant at birth". // CHECK //. * Analysis Preparation Wizard. CSPLAN ANALYSIS /PLAN FILE='...\Malawi.csaplan' /PLANVARS ANALYSISWEIGHT=weight /SRSESTIMATOR TYPE=WOR /PRINT PLAN /DESIGN STRATA=strata CLUSTER=psu /ESTIMATOR TYPE=WR. *********************************************************. * Complex Samples Crosstabs. CSTABULATE /PLAN FILE='...\Malawi.csaplan' /TABLES VARIABLES=child_age_grp BY bottle /CELLS POPSIZE /STATISTICS SE /MISSING SCOPE=TABLE CLASSMISSING=EXCLUDE. *********************************************************. CROSSTABS /TABLES=child_age_grp BY bottle /FORMAT=AVALUE TABLES /CELLS=ROW /COUNT ROUND CELL. /* CROSSTABS /TABLES=child_age_grp BY bottle /FORMAT=AVALUE TABLES /CELLS=COUNT /COUNT ROUND CELL. /* FREQUENCIES VARIABLES=bottle place_delivery skilled_birth child_age_grp child_age /ORDER=ANALYSIS.