[R] Stratified study.
Mark Myatt
mark at myatt.demon.co.uk
Tue Nov 6 14:58:48 CET 2001
Maarten van Gelder <mvgelder at vt.edu> writes:
>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.
This looks like a job for GEE methods. These are implemented in the gee
add-in package.
Mark
--
Mark Myatt
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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