The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Ethiopia » malawi (logistic regression )
Re: malawi [message #17557 is a reply to message #17556] Mon, 15 April 2019 13:06 Go to previous messageGo to previous message
mmbah is currently offline  mmbah
Messages: 8
Registered: March 2019
Member
Dear Tom Pullum,

Thank you very much for your kind response. I have used the codes below and the logistic regression worked without error. However, the number of stillbirth has reduced from 236 (DHS final report) to 232 and early neonatal deaths as decrease from 378 (DHS final report) to 338 see below codes and cross tabulations. Thus, I am concern if my calculations are correct. My primary outcome interest is perinatal mortality. Secondly, I generated party by recoding the total births entries (v224) to parity 0,1,2,3,4,5+. However, when I cross tabulated early neonatal deaths and parity, parity 0 had zero early neonatal deaths. This looks weird to me and was concern perhaps something is wrong with my analysis. see below and cross tabulations. I look forward hearing from you soon. Your kind response is very highly solicited.

gen stillbirths = 0
label variable stillbirths "Stillbirths"
gen births = 0
label variable births "Births in calendar"
gen births2 = 0
label variable births2 "Births in birth history"

gen earlyneo = 0
label variable earlyneo "Early neonatal deaths"
gen infant_deaths=0
label variable "infant deaths"
gen child_deaths=0
label variable "child deaths"
gen beg = v018
gen end = v018+59
local vcal_len = strlen(vcal_1[1])
forvalues i = 1/`vcal_len' {
replace births = births+1 if inrange(`i',beg,end) & substr(vcal_1,`i',1) == "B"
replace stillbirths = stillbirths+1 if inrange(`i',beg,end) & substr(vcal_1,`i',7) == "TPPPPPP"
}

replace end = v008
replace beg = v008-59

rename b3_0* b3_*
rename b6_0* b6_*
forvalues i = 1/20 {
replace births2 = births2+1 if inrange(b3_`i',beg,end)
replace earlyneo = earlyneo+1 if inrange(b3_`i',beg,end) & inrange(b6_`i',100,106)
replace infant_deaths = infant_deaths+ 1 if inrange(b3_`i',beg,end) & inrange(b6_`i',100,211)
replace child_deaths = child_deaths+ 1 if inrange(b3_`i',beg,end) & inrange(b6_`i',212,304)
}
gen totpreg7m = births2+stillbirths
label variable totpreg7m "Number of pregnancies of 7+ months duration"
gen perinatal = earlyneo+stillbirths
label variable perinatal "Perinatal mortality"
gen wt = v005/1000000
svyset v021 [pw = wt], strata(v023) singleunit(centered)

svy: tab parity earlyneo, count cellwidth(12) format(%12.2g)
(running tabulate on estimation sample)

Number of strata = 56 Number of obs = 24,562
Number of PSUs = 850 Population size = 24,562
Design df = 794

----------------------------------------------------
| Early neonatal deaths
paritylab | 0 1 Total
----------+-----------------------------------------
0 | 5532 0 5532
1 | 3747 51 3798
2 | 3428 91 3519
3 | 3095 47 3141
4 | 2635 46 2682
5+ | 5787 103 5890
|
Total | 24224 338 24562
----------------------------------------------------
Key: weighted count

Pearson:
Uncorrected chi2(5) = 124.1167
Design-based F(4.84, 3845.21)= 15.1343 P = 0.0000

. svy: tab wealth stillbirths, count cellwidth(12) format(%12.2g)
(running tabulate on estimation sample)

Number of strata = 56 Number of obs = 24,562
Number of PSUs = 850 Population size = 24,562
Design df = 794

----------------------------------------------------
wealth |
index | Stillbirths
combined | 0 1 Total
----------+-----------------------------------------
poorest | 4699 46 4745
poorer | 4641 51 4692
middle | 4584 50 4635
richer | 4653 27 4680
richest | 5752 58 5810
|
Total | 24330 232 24562
----------------------------------------------------
Key: weighted count

Pearson:
Uncorrected chi2(4) = 8.8778
Design-based F(3.85, 3059.99)= 1.2668 P = 0.2814



 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Birth preparedness plan variable
Next Topic: anemia among lactating mothers
Goto Forum:
  


Current Time: Thu Apr 18 23:58:13 Coordinated Universal Time 2024