The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Bangladesh » Stillbirths
Stillbirths [message #9803] Sun, 22 May 2016 08:43
sumonrupop is currently offline  sumonrupop
Messages: 23
Registered: August 2015
Location: Rajshahi
Member

Hi
I am trying to calculate stillbirths by using pooled data of most recent three BDHS data. I generate the comment given below but not work properly. Can anyone help me in this regards
/calculation of stillbirth poolir
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
replace stillbirths=1 if stillbirths==2


//survey set preparation
gen psu =v001

egen strata=group(v024 v026) /*BDHS first stratify region and then urban (city. others)/rural*. It contains =20=OK*/

*gen strata = hv023 /*this may correct because DHS mention 20 strata*/
gen sampwt=v005/1000000 //as per DHS instruction page 9 variable v005//
svyset psu [pw=sampwt], strata(strata)

/////////////////Weight/////////////////////
gen sqw =sampwt^2
egen sumsqw = sum(sqw), by(v001)
egen sumw = sum (sampwt), by(v001)
gen cluswt=sampwt* sumw/sumsqw
gen pwt2=cluswt
gen pwt1=sampwt

* Produce number of stillbirths
svy: tab stillbirths, cell count

svy: tab stillbirths , per count form(%7.3g)
svy: tab stillbirths, per col form(%7.3g)


Md. Nuruzzaman Khan
Previous Topic: Calculating Mean age at first marriage
Next Topic: Missing values in 2014 Bangladesh DHS
Goto Forum:
  


Current Time: Thu Mar 28 22:31:30 Coordinated Universal Time 2024