Steve Powell
2010-Mar-23 14:39 UTC
[R] multi-stage sampling and hierarchical models: which packages?
Dear wizaRds, I have a dataset to analyse which is causing me problems. It is a sample of parents in schools. First we had a population table of the schools in the country in question divided into five regions, and in each region we have an urban/rural split. The population Ns in these ten cells are known. Then three schools were drawn from each cell according to the Lahirie method, i.e with probability of being selected depending on school size. Students were then drawn randomly from the schools, again with probability proportional to school size. Details of this are below in case this is important. I have calculated the weights. So I have a weighting problem and a mixed levels problem at the same time. Even if I just use the survey package I am not sure how to specify the model, because I have clusters within strata rather than strata within clusters. I guess it would look something like dstrat<-svydesign(id=~schoolC,strata=~region+urbanrural, weights=~newweight, data=mydataset,nest=T), but this gives the same results as dstrat<-svydesign(id=~schoolC,strata=~region, weights=~newweight, data=mydataset,nest=T) And I can't see any way to look at the mixed levels effects using that package. Perhaps I am better advised to use nlme; I guess I can just use the weights as a covariate? My ultimate aims are to conduct various regressions in which I expect the school- and region-level effects to be strong. Ideally I would like to use sem as well, but then I am really stuck. If someone could put me on the right track I could be more specific with reproducible examples etc Best Wishes Steve Powell ******************details of Lahirie method as we used it: the schools were put into a list in order of ascending size (student population) and this list was divided into three bands containing 25%, 35% and 40% of all the students in the cell, respectively; and three schools were chosen randomly from each size band. Then samples of students were drawn randomly from lists of students at each school, so that more students were chosen from the larger schools: 20, 30 and 40 from each of the smaller, medium and large schools. So we have (20+30+40)*3 students per cell, for 10 cells = 2700 students in this country. www.promente.org | skype stevepowell99 | Thailand +66 8 4438 2667 [[alternative HTML version deleted]]