The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » How to Weight Data in R
Re: How to Weight Data in R [message #16337 is a reply to message #770] Sat, 15 December 2018 18:29 Go to previous messageGo to previous message
correaem is currently offline  correaem
Messages: 3
Registered: December 2018
Location: Cincinnati
Member
Hi Trevor,

I initially followed this post indications, Since I am doing some preliminary hiv research but I've got different results using R. These intervals are what I've got from running:

SAS (left) VS SPSS (right)
/index.php?t=getfile&id=1020&private=0

R Studio using
/index.php?t=getfile&id=1021&private=0

Notes:
1. It is exactly the same table I hva pre-processed in R and the exported as xlsx for 3rd party tools.
The line I use
DHSdesign <- svydesign(id = ~PSU, strata=~Strata, weights = ~hivweight, data=fLogitFiltered2)
V021 is used as PSU and V023 for the strata after checking the design survey

2. For SAS and SPSS I followed the recommendation from the official source of DHS https://www.youtube.com/watch?v=NNg8HD_lKow
3. As you could see, SPSS and SAS give the same results totally different from R, unfortunately.

Any advice would be great, thanks in advance
Esteban
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Pooling 3 rounds of DHS Nepal -- weights?
Next Topic: Applying weights for HIV Prevalence
Goto Forum:
  


Current Time: Wed May 15 03:43:57 Coordinated Universal Time 2024