Penta1 to measles dropout [message #24395] |
Sat, 07 May 2022 16:35 |
adis
Messages: 20 Registered: May 2022
|
Member |
|
|
We are exploring the 2019 mini Ethiopian DHS data set and we have created penta1 to measles dropout using formula in STATA. However, after generating the new var the, third category was created with a label of negative number. We cant figure out why that was happened? would you please help us solve this problem?
********the stata command we used was
gen penta1_ms_Drop= DPT1-ms
label define penta1_ms 0"Not dropped" 1"Dropped"
label val penta1_ms_Drop penta1_ms_Drop
what command should be used to overcome the negative number?
thank you for your swift response
[Updated on: Sat, 07 May 2022 16:39] Report message to a moderator
|
|
|
Re: Penta1 to measles dropout [message #24403 is a reply to message #24395] |
Tue, 10 May 2022 10:23 |
Janet-DHS
Messages: 911 Registered: April 2022
|
Senior Member |
|
|
Janet-DHS wrote on Tue, 10 May 2022 10:22Following is response from DHS Research & Data Analysis Director, Tom Pullum:
All the numbers in DHS reports are weighted by v005. Are you using weights? If you cannot match a number in a report, please tell us which number in which table in which report.
I have not worked with a DPT dropout variable before but I assume your DPT_dropout variable should would be calculated as follows:
gen DPT_dropout=0 if inrange(h3,1,3)==1
replace DPT_dropout=1 if DPT_dropout==0 & inrange(h,1,3)==0
I don't know what your "ms" variable is (it must be related to h9) but the logic would be the same. The dropout variable should be a binary variable that is conditional on having received DPT1, and it is NA (a dot in Stata) if the child did not receive DPT1. That is, it is NA if the did not receive DPT1, 0 if it received DPT1 but not DPT3, and 1 if it received DPT1 AND DPT3. That's what the two Stata lines would construct.
The woman is interviewed. In the KR file there is one record for each child born in the past five years. The file includes children who have died. The child's record includes most of the mother's variables, and there is hardly ever a reason to merge the KR and IR files.
|
|
|