[R] Stratified study.

Maarten van Gelder mvgelder at vt.edu
Thu Nov 1 16:06:17 CET 2001


I am analyzing the results of a survey of the student body on the use of 
certain technologies. The student body was divided in strata according to 
two criteria, college and user class. The resulting 24 strata were sampled. 
Subjects filled out a survey with a number of questions, most of them of 
the yes-no variety. I created a data.frame with the results for the survey. 
One row for each subject, one column for each question. Additional columns 
are for a subject identifier, college, and user class. The 'yes' and 'no' 
responses were represented by '1' and '0' respectively. The other responses 
were already numeric.

The design is that of a stratified random sampling with unequal weights. I 
created a weight vector 'wt' with the weight for each observation 
(subject), from the total population, the stratum size, and the number of 
subjects in each stratum. Using the weighted.mean procedure, I calculated 
the mean for each question. Per strata means I can calculate with the 
aggregate function. This is about as far as my knowledge of statistics and 
of R has taken me. I am not sure how to go about testing for a stratum 
effect (on a per question basis, or across all questions), or pair wise 
comparisons between strata (e.g. are there proportionally more laptop 
owners among the undergraduate engineering students than among their peers 
in architecture). I would greatly appreciate it if someone could steer me 
in the right direction.

Thank you,


M. F. van Gelder
Network Analyst
Communications Network Services
Virginia Polytechnic Institute & State University
1700 Pratt Dr, Blacksburg VA 24061
Voice: (540)231-4146;  Fax: (540)231-3928;  E-mail: mvgelder at vt.edu

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list