The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Ethiopia » malawi (logistic regression )
malawi [message #17523] Fri, 05 April 2019 15:32 Go to next message
mmbah is currently offline  mmbah
Messages: 7
Registered: March 2019
Member
Dear All,

I want to run a logistic regression on stillbirth using the MALawi Data. However, my regression model fails if I do the survey set. I kindly look forward for your kind help

svyset v021 [pweight=wt], strata(v023) vce(linearized) singleunit(missing)

pweight: wt
VCE: linearized
Single unit: missing
Strata 1: v023
SU 1: v021
FPC 1: <zero>

. svy: logistic stillbirths i.v190
(running logistic on estimation sample)
an error occurred when svy executed logistic
r(2000);

Thanks for your kind help in advance

Kind regard
Mamadou
Re: malawi [message #17556 is a reply to message #17523] Mon, 15 April 2019 09:02 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1601
Registered: February 2013
Senior Member

Following is a response from Senior DHS Stata Specialist, Tom Pullum:

I suggest two changes--replace "missing" with "centered" and remove "vce(linearized)". However, it still may not work. Your outcome is very rare, so you will have many combinations of predictors in which there are no stillbirths at all. You may not be able to include more than a couple of covariates at a time.

Re: malawi [message #17557 is a reply to message #17556] Mon, 15 April 2019 13:06 Go to previous message
mmbah is currently offline  mmbah
Messages: 7
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



Previous Topic: matching data with the report
Next Topic: Birth preparedness plan variable
Goto Forum:
  


Current Time: Tue Apr 23 02:39:25 Eastern Daylight Time 2019