The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Post-stratification for DHS data
Post-stratification for DHS data [message #11194] Wed, 16 November 2016 22:36 Go to previous message
sd535 is currently offline  sd535
Messages: 8
Registered: March 2013
Location: Wollongong, NSW, Australi...
Member

Hi,
I wish to post-stratify the Bangladesh DHS data at district-level according to the total number of children per district extracted from the recent census.
I use the following code for post-stratification. However, I didn't get any change after post-stratification. Am I doing any wrong?

Preliminary Design:

DHSdesign <- svydesign(id = child.data.HAZ$V001, strata=child.data.HAZ$V023, weights = child.data.HAZ$V005/1000000, data=child.data.HAZ)

ps.weights <-
data.frame(
CODIST = c (PostStrata.Wt.Cal$dist.id) , # District ID (relates to CODIST )
Freq = c( PostStrata.Wt.Cal$children.census ) # Number of children under 5
)

DHSdesign.Post.Strata <-
postStratify(
DHSdesign ,
strata = ~CODIST ,
population = ps.weights
)

DE.MEAN.HAZ.District<-svyby(~HW70, ~CODIST, DHSdesign, svymean)
PS.DE.MEAN.HAZ.District<-svyby(~HW70, ~CODIST, DHSdesign.Post.Strata, svymean)
SE.DE.MEAN.HAZ.District<-svyby(~HW70, ~CODIST, DHSdesign, svymean)[,3]*100
PS.SE.DE.MEAN.HAZ.District<-svyby(~HW70, ~CODIST, DHSdesign.Post.Strata, svymean)[,3]*100

> summary(DE.MEAN.HAZ.District)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-241.6 -185.3 -162.2 -167.6 -146.8 -112.0
> summary(PS.DE.MEAN.HAZ.District)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-241.6 -185.3 -162.2 -167.6 -146.8 -112.0

> summary(SE.DE.MEAN.HAZ.District)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.0 935.5 1326.0 1298.0 1612.0 2536.0
> summary(PS.SE.DE.MEAN.HAZ.District)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.0 935.5 1326.0 1298.0 1612.0 2536.0

There is no difference. And the most im[portant problem is that the SE for one area is zero.

Can you please inform me where I am doing the wrong.


Sumonkanti Das
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How would I use weights in this scenario?
Next Topic: Weighting data after merging survey rounds with different levels of representation
Goto Forum:
  


Current Time: Fri Apr 19 19:14:08 Coordinated Universal Time 2024