The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » General » DHS ZIMBABWE 2015 (DEFF and Survey package R)
DHS ZIMBABWE 2015 [message #23885] Wed, 29 December 2021 06:13 Go to previous message
p.pajak is currently offline  p.pajak
Messages: 3
Registered: December 2021
Member
Good Morning,

I am in the process of analysing the 2015 DHS from Zimbabwe. I am using R (I am quite new to the programme) and I am currently stuck as my DEFFs are all coming out negative (it should not happen in my case) or not at all.
I am analysing the data from 1 region only and I already did the cleaning and subset of my data.
I set my survey design following the instructions I found online from other users:
DHSdesign<-svydesign(id= ~fin_df$PSU, #V021
strata= ~fin_df$STRATA, #V022
weights= ~fin_df$PERWEIGHT, #V005
data=fin_df)

Now, I want to calculate the DEFF for the variable C_SEX2 from my fin_df dataframe and I type the following:
DEFF<- svymean(~fin_df$C_SEX2, design=DHSdesign, na = TRUE, deff = TRUE)

the output is the following:
Warning message:
In svymean.survey.design2(~fin_df$C_SEX2 == 1, design = DHSdesign, :
Sample size greater than population size: are weights correctly scaled?

mean SE DEff
fin_df$C_SEX20 0.548656 0.021449 NA
fin_df$C_SEX21 0.451344 0.021449 NA

I also tried:
DEFF1 <- svytotal(~fin_df$C_SEX2, design=DHSdesign, na = TRUE, deff = TRUE)
total SE DEff
fin_df$C_SEX20 144.736 12.150 -5.2710
fin_df$C_SEX21 119.065 9.295 -3.0851

Can anyone see a mistake or advise me?

Thank you very much in advance :)

Best wishes,
Patrizia

[Updated on: Wed, 29 December 2021 06:14]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: gender matching interviewer / participant in Zimbabwe & Burundi
Next Topic: Jordan - Cousin Marriage Question
Goto Forum:
  


Current Time: Wed Apr 24 02:46:48 Coordinated Universal Time 2024