Home » Countries » Bangladesh » Creating Nutritional intake
Creating Nutritional intake [message #14204] |
Sun, 04 March 2018 07:29 |
anikhpg42@gmail.com
Messages: 38 Registered: December 2017 Location: Bangladesh
|
Member |
|
|
Hi,
In BDKR14 database, I want to create a new variable named "Nutritious food given to child" by combining 12 binary variables. What can
I do in the next level? I have done recoding upto the following commands,
******Foods given to the child
*Plain water
recode v409 (0 = 0 "No") (1 = 1 "Yes"), gen(water)
label variable water "Plain water"
label values water water
ta water
*juice
recode v410 (0 8 = 0 "No") (1 = 1 "Yes"), gen(juice)
label variable juice "juice"
label values juice juice
ta juice
*Tinned/powdered milk
recode v411 (0 8 = 0 "No") (1 = 1 "Yes"), gen(tmilk)
label variable tmilk "Tinned/powdered milk"
label values tmilk tmilk
ta tmilk
*Baby formula
recode v411a (0 = 0 "No") (1 = 1 "Yes"), gen(bf)
label variable bf "Baby formula"
label values bf bf
ta bf
*Bread, noodles & other foods from grains
recode v414e (0 = 0 "No") (1 = 1 "Yes"), gen(grains)
label variable grains "Bread, noodles & other foods from grains"
label values grains grains
ta grains
*Potatoes, cassava or other tubers
recode v414f (0 = 0 "No") (1 = 1 "Yes"), gen(tubers)
label variable tubers "Potatoes, cassava or other tubers"
label values tubers tubers
ta tubers
*Eggs
recode v414g (0 = 0 "No") (1 = 1 "Yes"), gen(eggs)
label variable eggs "Eggs"
label values eggs eggs
ta eggs
*Meat
recode v414h (0 8 = 0 "No") (1 = 1 "Yes"), gen(meat)
label variable meat "Meat"
label values meat meat
ta meat
*Pumpkin, carrots or squash
recode v414i (0 = 0 "No") (1 = 1 "Yes"), gen(pumpkin)
label variable pumpkin "Pumpkin, carrots or squash"
label values pumpkin pumpkin
ta pumpkin
*Mangoes, papayas, other vitamin a fruits
recode v414k (0 = 0 "No") (1 = 1 "Yes"), gen(fruits)
label variable fruits "Mangoes, papayas, other vitamin a fruits"
label values fruits fruits
ta fruits
*Mineral rich foods
recode v414m (0 8 = 0 "No") (1 = 1 "Yes"), gen(mineral)
label variable mineral "Mineral rich foods"
label values mineral mineral
ta mineral
*Fish
recode v414n (0 8 = 0 "No") (1 = 1 "Yes"), gen(fish)
label variable fish "Fish"
label values fish fish
ta fish
What should be the next commands to create a binary variable named "Nutritious food given to child" (Given properly, Not given properly) by combining
these 12 variables.?
Can anyone help me?
Thank you very much.
ASIBUL ISLAM ANIK
|
|
|
|
|
|
Re: Creating Nutritional intake [message #14687 is a reply to message #14320] |
Mon, 30 April 2018 03:04 |
Hassen
Messages: 121 Registered: April 2018 Location: Ethiopia,Africa
|
Senior Member |
|
|
Dear DHS Experts, How can I construct Minimum Dietary Diversity Score from KR file Using SPSS command? Sorry I am a fresh DHS User.
Thank you in advance!!
Hassen Ali(Chief Public Health Professional Specialist)
|
|
|
Re: Creating Nutritional intake [message #14753 is a reply to message #14687] |
Thu, 03 May 2018 14:58 |
Bridgette-DHS
Messages: 3208 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".
|
|
|
Goto Forum:
Current Time: Wed Dec 11 22:53:12 Coordinated Universal Time 2024
|