Home » Data » Weighting data » How to Weight Data in R
Re: How to Weight Data in R [message #17444 is a reply to message #17443] |
Tue, 19 March 2019 10:52 |
Trevor-DHS
Messages: 789 Registered: January 2013
|
Senior Member |
|
|
It looks like it doesn't like the parameter id=, but wants ids=. Try
DHSdesign <- svydesign(ids = stata.file$v021, strata=stata.file$v022, weights = stata.file$v005/1000000, data=stata.file)
I just tested on my system, though, and it accepts id=, so I'm not sure that is your problem.
Also look at how the variable names are spelled. Usually they are all lower case, but you have V005 with a capital letter in your post, but this should probably be v005 (as I used it above). I think this is maybe your source of error.
|
|
|
Goto Forum:
Current Time: Thu Apr 25 07:08:57 Coordinated Universal Time 2024
|