The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Fertility » Indonesia vcal calendar data
Re: Indonesia vcal calendar data [message #3727 is a reply to message #3557] Mon, 02 February 2015 16:58 Go to previous messageGo to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 787
Registered: January 2013
Senior Member
A few answers to your questions and comments:
1) In the code given, you should not be looking at totpreg5, but at totpreg7m. totpreg5 gave all pregnancies in the last 5 years, not just those of 7 months or more. totpreg7m gives the number of pregnancies of 7 months or more. If you look at totpreg7m you will see it is less (not more) than the number in table 10.6 as it does not include the twins.
2) To include twins in this variable you can add the following code to the code given earlier:
* Compute additional twins in the last 5 years.  One is counted in totpreg7m already, this just counts the 2nd and 3rd, etc.
* First rename birth history variables to facilitate forvalues loop
rename b*_0* b*_* 
gen twins = 0
* loop through the birth history counting the additional twins in the last 5 years
forvalues i = 1/20 {
  * only count second, third, etc. of twins if born in the last 5 years
  replace twins = twins+1 if b3_`i' != . & b3_`i' >= v008-59 & b0_`i' >= 2
}
replace totpreg7m = totpreg7m+twins
tab totpreg7m [iw=wgt]

This code counts all of the additional twins in the last 5 years and adds those to totpreg7m. Note that this is not all twins, but all 'additional' twins as one child has already been counted.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: B11 is actually missing or it represent first birth?
Next Topic: last birth
Goto Forum:
  


Current Time: Fri Mar 29 09:39:49 Coordinated Universal Time 2024