I have survey data that I am working on. I need to make some multi-way tables and regression analyses on the data. After attaching the data, this is the code I use for tables for four variables (sweight is the weight variable):
> a <- xtabs(sweight~research.area + gender + a2n2 + age) > tmp <- ftable(a) Is this correct? I don't think I need to use the strata and cluster variables, right? And, below is the logistic regression code that I use for randomly sampled, or unweighted, data: > logit.1 <- glm(var4 ~ var3 + var2 + var1, family = binomial(link = > "logit")) > summary(logit.1) But how can I do the same analyses for the weighted data? Here is some additional info: There are four variables in the dataset that reflect the sampling structure. These are 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: weights -- View this message in context: http://r.789695.n4.nabble.com/crosstable-and-regression-for-survey-data-weighted-tp4634083.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.