The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Sampling » Survey Design Issue
Re: Survey Design Issue [message #22510 is a reply to message #22488] Mon, 22 March 2021 16:32 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3035
Registered: February 2013
Senior Member
Following is a response from DHS Senior Sampling Specialist, Mahmoud Elkasabi:


Apparently this is due an error in the IR dataset (I assume it exists in the other ones as well; I haven't checked). One woman in cluster 476 is coded as rural in v025 although the cluster is urban. This causes the error message.

Here are two possible solutions:

1- Use the nest option after you re-construct v021 and v023:

IRdata$STRAT <- as.integer(factor(with(IRdata, paste(v024, v025))))
IRdata$CLUST <- as.integer(factor(with(IRdata, paste(v023))))

DHSdesign<-svydesign(id = IRdata$CLUST, strata = IRdata$STRAT, weight = IRdata$v005, data=IRdata, nest = TRUE)
2- Recode a new v025 variable (say v025r) where you assign all cases with v021=476 to v025r=1 (otherwise v025r=v025) and then proceed with the code below:

IRdata$STRAT <- as.integer(factor(with(IRdata, paste(v024, v025r))))
IRdata$CLUST <- as.integer(factor(with(IRdata, paste(v023))))

DHSdesign<-svydesign(id = IRdata$CLUST, strata = IRdata$STRAT, weight = IRdata$v005, data=IRdata)
 
Read Message
Read Message
Read Message
Previous Topic: Refugees and Internally Displaced People (IDP)
Next Topic: Same PSUs in different survey waves
Goto Forum:
  


Current Time: Thu Apr 18 22:25:19 Coordinated Universal Time 2024