[R] Complex samples (was "contingency tables in R")

Mark Myatt mark at myatt.demon.co.uk
Tue Apr 17 15:46:26 CEST 2001


Patrick Ball <lookout_20005 at yahoo.com> writes:
>Thanks to Kurt and Mark for their thorough
>suggestions.  I look forward to working through their
>notes.   I'd like to ask for a bit more clarification
>on one point, though.  
>
>
>> The most complicated piece of this is contingency
>> tables done with sample data.  The sampling involves
>> several strata with different sampling weights. 
>> Calculating the cell (or row or column)
>> probabilities
>> is relatively easy, but the other statistics can be
>> complicated (the design effect, the finite
>> population
>> correction, the various chi^2s, and the standard
>> errors and confidence intervals). Also, I sometimes
>> make these tables with summary statistics in place
>> of
>> counts or population proportions.  
>
>
>Both Mark and Kurt noted that they believe that the
>pieces I'd need to work in the sampling statistics are
>available, I'd just need to piece them together.
>
>What are the pieces I'd use to put this together? 
>Thanks in advance for all help - PB.

That is a more complicated proposition. There should be no problem
making the tables but you will have to write the code to calculate the
intra-class correlation coefficients so that you can produce robust SEs
and chi-squares or use the gee() (Liang & Zeger's generalized estimation
equation methods) in the GEE library (available from CRAN).

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