It seems the var names you've put are not the same as in the design object:

"all variables must be in design= argument ": that means the object you've
assigned in mydesign <- svydesign(ids=~vill_neigh_code+clust,
strata=~strat, weights=~sweight, data=mydata)

Check the spelling. Note that the "mydesign" is *not* a dataframe. That
means that mydesign[,5] or mydesign$myvar won't work (off course neither
will naming the original dataframe "mydata"), you must just use the
variable names alone

for instance:

svyglm(api00~ell+meals+mobility, design=dstrat)

is correct, using only the var names, not dstrat[smth]~dstrat[smth]

If you write the names correctly it should work

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to