Displaying 1 result from an estimated 1 matches for "natwgt".
Did you mean:
awgt
2011 Aug 18
1
Comparison of means in survey package
...comparison of means from a complex survey design. The data for the example looks roughly like this:
mytest<-data.frame(harper=rnorm(500, mean=60, sd=1), party=sample(c("BQ", "NDP", "Conservative", "Liberal", "None", NA), size=500, replace=TRUE), natwgt=sample(c(0.88, 0.99, 1.43, 1.22, 1.1), size=500, replace=TRUE), gender=sample(c("Male", "Female"), size=500, replace=TRUE))
Using svyby I can get the means for each group of interest (primarily the party variable), but I can't get further to actually do the comparison of me...