Re: Teenage pregnancies by year 2015 to 2022 [message #29615 is a reply to message #28790] |
Wed, 10 July 2024 14:14 |
Janet-DHS
Messages: 891 Registered: April 2022
|
Senior Member |
|
|
Following is a response from DHS staff member, Tom Pullum:
I would propose modifications to what you are doing. First, I believe you want age at the time of the pregnancy, not at the time of the survey. Second, I would date the pregnancy by the estimated month when it began, p3-p20, rather than the month when it ended. Also I would refer to age 20-24 as "youth" rather than "teenage".
The following Stata lines will give what I believe you are looking for. The table includes ages below 15, but there is incomplete reporting for those ages because the sample is limited to age 15+ at the time of the survey. You can include more variables for your analysis, of course. Please let us know if you have questions.
*DHS has just released a new version of the data files for the Kenya 2022 survey. There are no changes to the variables you are using, but I recommend that you switch to the new files.*
use " KEIR8BFL.DTA", clear
* Reduce to the minimum variables needed; you can keep more
* Standard DHS approach uses months but not days
keep v001 v002 v003 v005 v011 p3_* p20_*
* Remove 0's in subscripts
rename *_0* *_*
* Calculate cmc of conception OR just use p3 if you want
forvalues li=1/20 {
gen pconception_`li'=p3_`li'-p20_`li'
}
drop p3_* p20_*
reshape long pconception_, i(v001 v002 v003) j(pidx)
rename *_ *
* Calculate the woman's age at the conception
gen age=int((pconception-v011)/12)
keep if age<=24
* Calculate the calendar year of the conception
gen year=1900+int((pconception-1)/12)
keep if year>=2015
tab age year
tab age year [iweight=v005/1000000]
|
|
|