Home » Data » Weighting data » How to Weight Data in R
How to Weight Data in R [message #179] |
Thu, 21 March 2013 16:17 |
Jewel
Messages: 1 Registered: March 2013 Location: United States
|
Member |
|
|
I am trying to use the package "Survey" in R to do a DHS analysis, but I want to be sure that I am setting up the weights properly.
My general code is as follows:
weight<-mydhsdata$v005/1000000
> data <- svydesign(id = mydhsdata$caseid, strata=mydhsdata$v021,
+ weights = weight,
+ data=mydhsdata)
If anyone has any insights on how to set up the dataset in R, I would appreciate the help!
|
|
|
Goto Forum:
Current Time: Thu Dec 12 23:15:27 Coordinated Universal Time 2024
|