[R] svyglm question
haps
halptekin at gmail.com
Fri Jun 29 09:20:36 CEST 2012
I formed a survey design as:
> library(survey)
> mydesign <- svydesign(ids=~vill_neigh_code+clust, strata=~strat,
> weights=~sweight, data=mydata)
where
strat: stratum (urban or (sub-county) rural).
clust: batch of interviews that were part of the same random walk
vill_neigh_code: village or neighbourhood code
sweight: probability weights
Then, I run a logistic regression as
> logit.1 <- svyglm(response~var1+var2+var3+var4+var5+var6, design=mydesign,
> data=mydata, family=quasibinomial())
And I get this error message:
Error in svyglm.survey.design(response ~ var1 + var2 + var3 + var4 + :
all variables must be in design= argument
What should I change in the syntax in this case?
--
View this message in context: http://r.789695.n4.nabble.com/svyglm-question-tp4634844.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list