Indonesia vcal calendar data [message #3557] |
Wed, 07 January 2015 14:08 |
adev
Messages: 14 Registered: May 2013
|
Member |
|
|
Hello -
I am working with the contraceptive calendar in the IDHS 2002 & 2007. I have managed to extract the calendar data and reshape in long form by month/year, designate the months of pregnancy and birth/termination, set data as time series to count 'spells' of pregnancy, as well as designate stillbirths and miscarriages by length of pregnancy. The code works pretty well and now I am trying to produce estimates of livebirths and stillbirths. I've excluded pregnancies less than 7 months gestation as well as pregnancies that were already ongoing at the beginning of the calendar. Of the remaining pregnancies, my numbers are off the published ones. Here are the numbers compared:
2002: 16,879 LB (my calc) & 15,089 LB (DHS published); 158 SB (my calc) and 147 SB (DHS published)
2007: 18,364 LB (my calc) & 16,504 LB (DHS published); 174 SB (both mine and DHS match here)
I am using the period Jan 1998 to Dec 2002 for DHS 2002 and Jan 2003 - Dec 2007 for DHS2007. I know DHS reports in 0-4 years prior to survey but I think these are the same time periods as I am using. Plus I don't think being off by a couple of months here and there should produce such a difference in the numbers of LBs. I would appreciate any advice on any different inclusion/exclusion criteria I should be employing so I could get close to the published numbers because I would really like to understand how DHS did it.
Thank you!
Alka
Alka Dev
Graduate Fellow
CUNY Institute for Demographic Research
|
|
|
|
Re: Indonesia vcal calendar data [message #3569 is a reply to message #3563] |
Mon, 12 January 2015 05:08 |
adev
Messages: 14 Registered: May 2013
|
Member |
|
|
Hello -
Yes I tried to select on months 0-59 preceding the survey and I get closer with live births but also lose stillbirths. I am attaching the do file I used just to create the DHS2002 sample in case you can see any obvious issues. I am calculating months pregnant based on event_time in calendar year and then using that to select pregnancies that were 7 months or longer. I also get different numbers depending on whether I use calendar data on birth history data. But stillbirth estimates are coming directly from calendar data.
Thank you,
Alka Dev
Alka Dev
Graduate Fellow
CUNY Institute for Demographic Research
|
|
|
Re: Indonesia vcal calendar data [message #3646 is a reply to message #3569] |
Thu, 22 January 2015 09:07 |
adev
Messages: 14 Registered: May 2013
|
Member |
|
|
Hello -
Is it possible to get some insight into DHS calculation of neonatal mortality in the 2002 (or 2007) survey? Basically, regardless of whether I use birth history data or combined calendar data, I do not get close to DHS numbers. For 2002, I have about 146 births that are in the calendar but not in the birth history. So if I only include births that are in the history, I still do not get the 15,089 published number for the 0-4 years (I am using 0-59mos as period for v008 - b3). Also, to get stillbirths, I have to use calendar data so I am inclined toward using calendar data for live births as well, noting that there are births that are in the calendar and not in the history). My number is higher (15,952) for live births and this excludes multiple births.
Other than period and twin exclusions, are there other exclusions I am missing? Also using calendar data, I exclude all pregnancies ongoing at the beginning of the calendar and get about 155 SB while the published number is 147 for the period 0-59 months.
I had posted a do file earlier but I am happy to include a more detailed step by step description if needed.
Thank you!
Alka
Alka Dev
Graduate Fellow
CUNY Institute for Demographic Research
|
|
|
Re: Indonesia vcal calendar data [message #3648 is a reply to message #3557] |
Thu, 22 January 2015 11:20 |
Trevor-DHS
Messages: 802 Registered: January 2013
|
Senior Member |
|
|
I haven't gone through your code, but here is code that will calculate the number of still births from the calendar. It also calculates live births and total pregnancies of 7 months or more, but these counts exclude twins (for which you need to use the birth history in addition).
* Calculate still births in the last 5 years
gen stillbirths = 0
gen births = 0
gen nlbirths = 0
* Set length of calendar to use
gen callen = v018 + 59
* If calendar is aligned right (as in original dataset), use the following:
gen beg = v018
gen end = callen
* If calendar is aligned left (as it appears to be), use the following:
*gen beg = 1
*gen end = 60
* Loop through calendar summing births, non-live pregnancies and stillbirths
forvalues i = 1/80 {
* Restrict to 60 months preceding survey
replace births = births+1 if `i' >= beg & `i' <= end & substr(vcal_1,`i',1) == "B"
replace nlbirths = nlbirths+1 if `i' >= beg & `i' <= end & substr(vcal_1,`i',1) == "T"
replace stillbirths = stillbirths+1 if `i' >= beg & `i' <= end & substr(vcal_1,`i',7) == "TPPPPPP"
}
* total pregnancies in last 5 years
gen totpreg5 = births+nlbirths
* total pregnancies of 7+ months in last 5 years (all live births, plus the stillbirths)
gen totpreg7m = births+stillbirths
* Create weight variable.
gen wgt = v005/1000000
* Set up svyset parameters for complex samples.
svyset v021 [pweight=wgt], strata(v023)
* Produce number of stillbirths
svy: tab stillbirths, cell count
|
|
|
Re: Indonesia vcal calendar data [message #3668 is a reply to message #3648] |
Sat, 24 January 2015 11:39 |
adev
Messages: 14 Registered: May 2013
|
Member |
|
|
Thank you. Yes, this code does produce the published numbers of stillbriths. It however produces a larger number of total pregnancies lasting 7+ months than the published total. Also unsure how to add in twins (since gestation is unknown in birth hx data). It would mean adding to totpreg5 only. Is there any way to know why the pubished number of totpreg7m is lower than the number one gets using this code?
Alka Dev
Graduate Fellow
CUNY Institute for Demographic Research
|
|
|
|
Re: Indonesia vcal calendar data [message #3726 is a reply to message #3668] |
Mon, 02 February 2015 16:12 |
adev
Messages: 14 Registered: May 2013
|
Member |
|
|
Hello -
Just curious if there is exclusion criteria here that I should be aware of. Unfortunately I cannot move forward unless I can match DHS numbers (using this as a standard against which to compare calculations from other data).
Thank you.
Alka Dev
Graduate Fellow
CUNY Institute for Demographic Research
|
|
|
|
Re: Indonesia vcal calendar data [message #3740 is a reply to message #3727] |
Wed, 04 February 2015 07:48 |
adev
Messages: 14 Registered: May 2013
|
Member |
|
|
Thank you - I understand the coding now. I was using svy: tab to also look at totpreg7m counts but the numbers come up golden with this code added. The assumption is that all live births are 7months or longer gestation?
Best,
Alka
Alka Dev
Graduate Fellow
CUNY Institute for Demographic Research
|
|
|
|
Re: Indonesia vcal calendar data [message #3829 is a reply to message #3744] |
Fri, 20 February 2015 05:25 |
adev
Messages: 14 Registered: May 2013
|
Member |
|
|
Is it correct that stillbirths of twins are counted as 1 stillbirth since this figure comes from the calendar?
Alka Dev
Graduate Fellow
CUNY Institute for Demographic Research
|
|
|
Re: Indonesia vcal calendar data [message #3830 is a reply to message #3829] |
Fri, 20 February 2015 10:12 |
Trevor-DHS
Messages: 802 Registered: January 2013
|
Senior Member |
|
|
There are a couple of limitations in the calendar data and the possibility of capturing all of the information we might like. Two specific issues:
1) If there is a stillbirth and a live birth, only the live birth is captured.
2) If there are twins and both are stillbirths, only one is captured.
These, though are relatively rare events, but it does mean that we have very slight under-counts.
[Updated on: Thu, 29 October 2015 12:05] Report message to a moderator
|
|
|
Re: Indonesia vcal calendar data [message #8430 is a reply to message #3727] |
Tue, 27 October 2015 02:20 |
plnep
Messages: 11 Registered: November 2014
|
Member |
|
|
Thanks for all the information.
I have been trying to extract stillbirth information for each women along with the date of birth or the time in which pregnancy ended (Assuming the calendar ending period is the month of interview).
Any ideas on how to approach this problem would be highly appreciated.
Thanks,
plnep
[Updated on: Tue, 27 October 2015 02:21] Report message to a moderator
|
|
|
|
Re: Indonesia vcal calendar data [message #11396 is a reply to message #3648] |
Mon, 12 December 2016 01:15 |
tege2004@gmail.com
Messages: 3 Registered: August 2016
|
Member |
|
|
Hi i am tegene i tried to understand the code given for still birth calculation but i did not understand it particularly the following part.
Set length of calendar to use
gen callen = v018 + 59
* If calendar is aligned right (as in original dataset), use the following:
gen beg = v018
gen end = callen
* If calendar is aligned left (as it appears to be), use the following:
*gen beg = 1
*gen end = 60
* Loop through calendar summing births, non-live pregnancies and stillbirths
forvalues i = 1/80 {
* Restrict to 60 months preceding survey
replace births = births+1 if `i' >= beg & `i' <= end & substr(vcal_1,`i',1) == "B"
replace nlbirths = nlbirths+1 if `i' >= beg & `i' <= end & substr(vcal_1,`i',1) == "T"
replace stillbirths = stillbirths+1 if `i' >= beg & `i' <= end & substr(vcal_1,`i',7) == "TPPPPPP"
}
please is there any one to help me to understand how to find still birth by using calendar? or please tell me the above command with simple language??
|
|
|
|
Re: Indonesia vcal calendar data [message #18181 is a reply to message #3648] |
Mon, 07 October 2019 18:48 |
zelalemth
Messages: 4 Registered: August 2018 Location: United States
|
Member |
|
|
I was trying to convert the STATA code to SAS but I was not getting same results as in the tables. I am not sure if I converted the code correctly.
I appreciate your assistance in advance.
data data1;
set c.RWIR70FL;
* Calculate still births in the last 5 years;
stillbirths = 0;
births = 0;
nlbirths = 0;
* Set length of calendar to use;
callen = v018 + 59;
* If calendar is aligned right (as in original dataset), use the following;
beg = v018;
end = callen;
/* If calendar is aligned left (as it appears to be), use the following;
beg = 1;
end = 60;*/
* Loop through calendar summing births, non-live pregnancies and stillbirths
forvalues i = 1/80 {;
do i = 1 to 80;
* Restrict to 60 months preceding survey;
if i >= beg & i <= end & substr(vcal_1,i,1) = "B" then births = births+1;
if i >= beg & i <= end & substr(vcal_1,i,1) = "T" then nlbirths = nlbirths+1;
if i >= beg & i <= end & substr(vcal_1,i,7) = "TPPPPPP" then stillbirths = stillbirths+1;
end;
* total pregnancies in last 5 years;
totpreg5 = births+nlbirths;
* total pregnancies of 7+ months in last 5 years (all live births, plus the stillbirths);
totpreg7m = births+stillbirths;
* Create weight variable;
sweight = v005/1000000;
run;
* Set up parameters for complex samples and produce number of stillbirths;
proc surveyfreq data = data1;
cluster v021;
strata v023;
weight sweight;
tables stillbirths totpreg7m totpreg5;
run;
[Updated on: Mon, 07 October 2019 18:50] Report message to a moderator
|
|
|
|
Re: Indonesia vcal calendar data [message #18591 is a reply to message #18183] |
Tue, 07 January 2020 01:36 |
Mark
Messages: 11 Registered: May 2017 Location: Ethiopia
|
Member |
|
|
I have found the thread posted by one of our experts, Mr. Trevor Croft. It has helped me a lot. Thank you so much for that. However, the provided code remove other variables, which I want to consider them in the analysis model. Would you please provide me your usual hand to separately compute neonatal mortality, infant mortality and under-5 mortality? I, basically, want to use each mortality variable (i.e., neonatal, Infant and under-five mortality) as an outcome of the study. Many thanks for your help.
Regards
|
|
|
|
|