svydesign needs to be told what data frame to use, via the data= argument.
I get a slightly different error message from you: Error in eval(expr, envir, enclos) : object "subdiv" not found but this may be because I'm using survey version 3.3.1, not 2.9. There are several new features (listed at http://faculty.washington.edu/tlumley/survey/NEWS) so you may want to upgrade. On 10/10/2005 9:15 a.m., justin bem wrote: > Hi dears, > > I expect that Mr Thomas Lumley will read this message. > I have data from a complexe stratified survey. The population is divide in 12 > regions and a region consist to and urban area and rural one. there to region > just with urbain area. > > stratification variable is a combinaison of region and area type (urban/rural) > > In rural area, subdivision are sample with probabilties proporionnal to size > in population then enuration area are sample in selected division and finally > households are selected in those EA. > > In urban area, EA are directly selected and finally household are selected. > to schematise we have: > > (12 regions) > each region is divised in two regions / Urbain and rural. this are strata > in Rural : PSU are subdivision , SSU are EA and TSU are households > in Urban : PSU are EA , SSU are households. > > I use svydesign function as follow : > esi<-svydesign(id=~subdiv+EA+HHID,strata=~REGION+AREATYP,fpc=~FPC1+FPC2FPC3,weig=~pw,nest=T) > FPC1: number of subdivision in each strata > FPC2: number of EA in each subdivision > FPC3: number of HH in each EA. > pw : sampling weights > > but I have this error message : erron in data.frame(strata, 1:i,...) I dont > understand why ! > Can someone help me ? > > Sincerly. > > > > > > > --------------------------------- > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- James Reilly Department of Statistics, University of Auckland Private Bag 92019, Auckland, New Zealand ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html