The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » Co-occurrence of stunting & anemia, Stunting & overweight & obese among under five children
Co-occurrence of stunting & anemia, Stunting & overweight & obese among under five children [message #17914] Mon, 15 July 2019 11:21
Alinoor is currently offline  Alinoor
Messages: 6
Registered: January 2016
Location: Jigjiga
Member
Greetings!

I'm trying to generate a variable from two different variables. i.e a variable that has both stunted and overweight children. I came up with the following STATA codes but not sure if it is correct.

gen stunting_overweight=.
replace stunting_overweight =1 if stunting==1 & baz1==1
replace stunting_overweight =0 if stunting==1 & baz1==0

see the below table used as a reference when generating the variable


-------------------------------
| baz1
stunting | 0 1 Total
----------+--------------------
0 | .8916 .1084 1
| 5036 716 5752
|
1 | .9483 .0517 1
| 3004 219 3223
|
Total | .9131 .0869 1
| 8040 935 8975
-------------------------------

[Updated on: Mon, 15 July 2019 11:22]

Report message to a moderator

 
Read Message
Previous Topic: Stata Code for infant and young child feeding practices
Next Topic: SMART Methodology
Goto Forum:
  


Current Time: Sun Dec 22 09:03:20 Coordinated Universal Time 2024