Home » Topics » General » Interpolated surfaces
Re: Interpolated surfaces [message #24801 is a reply to message #24790] |
Wed, 13 July 2022 09:31 |
Janet-DHS
Messages: 893 Registered: April 2022
|
Senior Member |
|
|
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:
The following Stata lines should get you started. I suggest restricting to children who are living with their mothers (b9=0) because the reporting is much more accurate for them. For the child illness variables (h11, h22, h31), treat responses 1 or 2 as "yes". The label for h11 is usually H11 but sometimes it is h11; "describe h11" will give you the label. You do not need to do anything more with the weights; svyset and svy will re-normalize them. Other variables of interest will be dropped in the "collapse" but you can keep cluster-level variables like v005, v024, v025, etc., by adding them into the collapse statement after "(first)". I have included "diarrhea" in variable names because you might want to do something similar for other illnesses or outcomes and you need a notation to distinguish between them. You could use "h11" rather than "diarrhea". Hope this works for you.
describe h11
tab h11
label list H11
gen nch_diarrhea_yes=1 if b9==0 & (h11==1 | h11==2)
gen nch_diarrhea_no =1 if b9==0 & h11==0
collapse (first) v005 (sum) nch_diarrhea*, by(v001)
gen nch_diarrhea=nch_diarrhea_yes + nch_diarrhea_no
gen prop_diarrhea=nch_diarrhea_yes/nch_diarrhea
gen wt_diarrhea=v005*nch_diarrhea
summarize
histogram prop_diarrhea
|
|
|
Goto Forum:
Current Time: Sat Nov 30 01:41:22 Coordinated Universal Time 2024
|