The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Bangladesh » Creating Nutritional intake
Re: Creating Nutritional intake [message #14753 is a reply to message #14687] Thu, 03 May 2018 14:58 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3049
Registered: February 2013
Senior Member
Following is a response from DHS Technical Specialist, Rukundo Benedict:

Here is SPSS code geared towards reproducing the table.

*// [ Opening women's data file  ] **.
GET FILE=!DatPath+!IRDataF.

*// Age cut off. 
Compute Cutoff = 24.

*// VECTOR command to find the last child, the age and living status .
VECTOR B3 = B3$01 to B3$06
              /B9 = B9$01 to B9$06
              /B4 = B4$01 to B4$06
              /M4 = M4$1 to M4$6
              /M39 = M39$1 to M39$6.
LOOP i = 1 to 6.
+  DO IF (  (V008 - B3(i)  < CutOff) & B9(i)=0 ).
+     COMPUTE Months = V008 - B3(i).
*/ Sex .
+    COMPUTE ChldSex = B4(i).
*/ No breastfeeding.
+     COMPUTE BreastFg = 2.
*/ Currently breastfeeding .
+     IF ( M4(i) = 95 ) BreastFg = 1.
*// Amount of solid and semisolid.
+     COMPUTE M39w = M39(i).
*// if last child found, break the loop .
+     BREAK.
+  END IF.
END LOOP.

*// Selecting only mother with children 6-23m.
SELECT IF ( Months >= 6 & Months <= 23).

*// Weighting table.
COMPUTE rweight = V005 / 1000000.
WEIGHT BY rweight.

*// age of the child (First row variable)..
RECODE Months (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 ChAge.
VARIABLE LABELS ChAge "Age".
VALUE LABELS ChAge 1"0-1" 2"2-3" 3"4-5" 4"6-8" 5"9-11" 6"12-17" 7"18-23".


*// Milk group.
COUNT GroupA = V411 V411A V414V V414P (1).
IF ( GroupA > 0) GroupA = 1.
*// Grains / roots / tubers group.
COUNT GroupB = V412A V414E V414F (1).
IF ( GroupB > 0) GroupB = 1.
*// vitamin A rich fruits and vegetables.
COUNT GroupC = V414I V414J V414K (1).
IF ( GroupC > 0) GroupC = 1.
*// other fruits and vegetables group.
COUNT GroupD = V414L (1).
*// Eggs group.
COUNT GroupE = V414G (1).
*// meat, poultry, fish groups.
COUNT GroupF = V414M V414H V414N (1).
IF ( GroupF > 0) GroupF = 1.
*// legumes and nuts.
COUNT GroupG = V414O (1).
*// All groups.
COMPUTE AllGrps = ( GroupA +  GroupB + GroupC + GroupD + GroupE + GroupF + GroupG).
*// All groups excluding milk group.
COMPUTE AllGrps1 = (  GroupB + GroupC + GroupD + GroupE + GroupF + GroupG).

*// Total milk food.
COMPUTE TotMilk = 0.
IF ( V469E > 0 & V469E <= 7) TotMilk = TotMilk + V469E.
IF ( V469F > 0 & V469F <= 7) TotMilk = TotMilk + V469F.
IF ( V469X > 0 & V469X <= 7) TotMilk = TotMilk + V469X.
*// define minimum feeding times for breastfeed children .
COMPUTE MinFeed = 0.
IF ( BreastFg = 1 & Months >= 6 & Months <= 8   & m39w >= 2 & m39w <= 7) MinFeed = 1.
IF ( BreastFg = 1 & Months >= 9 & Months <= 23 & m39w >= 3 & m39w <= 7) MinFeed = 1.
*// define mimum feedings for none-breasfeeding children .
COMPUTE  Feedings = TotMilk.
IF ( m39w > 0 & m39w <= 7) Feedings = Feedings + m39w.
IF ( BreastFg = 2 & Feedings >= 4 ) MinFeed1 = 1.

*// Column1: 4+ food groups .
IF ( BreastFg = 1 & AllGrps >= 4 ) Coln01 = 1.
VARIABLE LABELS Coln01 "4+ food groups 1".
*// Column2: 4Minimum meal frequency .
IF ( BreastFg = 1 & MinFeed = 1 ) Coln02 = 1.
VARIABLE LABELS Coln02 "Minimum meal frequency 2".
*// Column 3: both 4+ & minimum times.
IF ( BreastFg = 1 & AllGrps >= 4 & Minfeed = 1) Coln03 = 1.
VARIABLE LABELS Coln03 "Both 4+ food groups and mini-mum meal frequency".
*// Column 4: Number of breast-fed children 6-23 months.
IF ( BreastFg = 1 & Months >= 6 & Months <= 23 ) Age623a = 1.
VARIABLE LABELS Age623a "".
VALUE LABELS Age623a 1"Number of breastfed children 6-23 months".
*// Label to be nested for breastfeeding children 6-23 months.
IF ( BreastFg = 1 & Months >= 6 & Months <= 23 ) Label1 = 1.
VARIABLE LABELS Label1 "".
VALUE LABELS Label1 1"Among breastfed children 6-23 months, percentage fed:".

*// Column 5: milk or milk products given 2+ times .
IF ( BreastFg = 2 & TotMilk >= 2 ) Coln05 = 1.
VARIABLE LABELS Coln05 "Milk or milk products 3".
*// Column 6: 4+ food groups  .
IF ( BreastFg = 2 & AllGrps >= 4 ) Coln06 = 1.
VARIABLE LABELS Coln06 "4+ food groups 1".
*// Column 7: Minimum meal frequency .
IF ( BreastFg = 2 & MinFeed1 = 1 ) Coln07 = 1.
VARIABLE LABELS Coln07 "Minimum meal frequency 4".
*// Column 8:  with 3 appropriate IYCF practices  .
IF ( BreastFg = 2 & AllGrps1 >= 4 & Totmilk >= 2 & MinFeed1 = 1 ) Coln08 = 1.
VARIABLE LABELS Coln08 "With 3 IYCF practices 5".
*// Column 9: Number of non-breast-fed children 6-23 months.
IF ( BreastFg = 2 ) Age623b = 1.
VARIABLE LABELS Age623b "".
VALUE LABELS Age623b 1"Number of non-breastfed children 6-23 months".
*// Label to be nested for breastfeeding children 6-23 months.
IF ( BreastFg = 2 & Months >= 6 & Months <= 23 ) Label2 = 1.
VARIABLE LABELS Label2 "".
VALUE LABELS Label2 1"Among non-breastfed children 6-23 months, percentage fed:".

*// Column 10: breastmilk or milk products given 2+ times .
IF ( BreastFg = 1 | TotMilk >= 2 ) Coln10 = 1.
VARIABLE LABELS Coln10 "Breast milk, milk or milk products 6".
*// Column 11: 4+ food groups  .
IF ( AllGrps >= 4 ) Coln11 = 1.
VARIABLE LABELS Coln11 "4+ food groups 1".
*// Column 11: Minimum meal frequency (minimum times or more for breafeeding and none-breastfeeding ).
IF ( MinFeed = 1 | MinFeed1 = 1) Coln12 = 1.
VARIABLE LABELS Coln12 "Minimum meal frequency 7".
*// Column 12:  with 3 appropriate IYCF practices  .
IF (coln03 = 1  | Coln08 = 1  ) Coln13 = 1.
VARIABLE LABELS Coln13 "With 3 IYCF practices".
*// Column 12: Number of children 6-23 months.
IF ( Months >= 6 & Months <= 23 ) Age623c = 1.
VARIABLE LABELS Age623c "".
VALUE LABELS Age623c 1"Number of children 6-23 months".
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: BDHS2014-bdkr data set- Children nutrition- table 11.6 in BDHS report, 4+food group
Next Topic: child mortality rate per women's empowerment indicator
Goto Forum:
  


Current Time: Mon May 6 07:02:41 Coordinated Universal Time 2024