[R] Help with

John Fox jfox at mcmaster.ca
Thu Oct 10 01:28:03 CEST 2002


Dear Andrew,

I recall that some time ago you posted a question to the list about fitting 
the linear-by-linear association model, and that Duncan Mackay pointed you 
towards <http://math.cl.uh.edu/~thompsonla/5537/Splusdiscrete.PDF>, which 
contains examples from Agresti worked in S. I assume that the RC model 
isn't included there.

The RC model isn't a loglinear model, so fitting it directly by glm 
software isn't possible, as far as I know. I believe that fitting the model 
in SAS requires a macro; I'm not sure how it's done in GLIM, but probably 
in a similar manner. Agresti describes a method, due to Goodman, that 
shouldn't be hard to implement, but I know of no ready-made solutions.

Regards,
  John

At 06:42 AM 10/10/2002 +0700, Andrew Criswell wrote:
>Hello All:
>
>I hope I can get someone interested in this problem:
>
>Agresti in "Analysis of Categorical Data," p. 289, applies a "row and column
>effects model" to analyze a two-dimensional cross-classification of ordinal
>data.
>
>He got his results in either SAS or GLIM. Is there a way to replicate his
>results with R?
>
>He claims the RC model fits well with G^2(RC) = 3.57 with df = 8.  The ML
>estimates for the row scores are (-1.11, -1.12, -0.37, 0.03, 1.01, 1.82) and
>the column estimates are (-1.68, -0.14, 0.14, 1.41) and beta = 0.17
>
>Below, is the data:
>
>tbl.0 <- expand.grid(SOCIO = letters[1:6],
>                                MENTAL = c('well', 'mild', 'moderate',
>'impaired))
>
>COUNTS <- c( 64, 57, 57, 72, 36, 21,
>                           94, 94, 105, 141, 97, 71,
>                           58, 54, 65, 77, 54, 54,
>                           46, 40, 60, 94, 78, 71)
>
>data.0 <- data.frame(tbl.0, COUNTS)

-----------------------------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox at mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox
-----------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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