José Ignacio Bustos Melo
2009-Jun-10 16:40 UTC
[R] Analisys in Multidimensional contingency tables
Dear R-list, Hi everyone, Im trying to make an analysis of multidimensional contingency tables using R. I' working with the Agresti example where you have the data from 3 categories. The thing is how can I do the analisys using the G2 statistics. Somebody can send me an Idea? I attach the program where you can find the data. Best Regards,> prob1<- data.frame(victim=c(rep('white',4),rep('black',4)),+ perp=c(rep('white',2),rep('black',2),rep('white',2),rep('black',2)), + death=rep(c('yes','no'),4), count=c(19,132,11,52,0,9,6,97))> prob1victim perp death count 1 white white yes 19 2 white white no 132 3 white black yes 11 4 white black no 52 5 black white yes 0 6 black white no 9 7 black black yes 6 8 black black no 97> ftable(xtabs(count ~ victim + perp + death, data = prob1))death no yes victim perp black black 97 6 white 9 0 white black 52 11 white 132 19>O__ ---- Jos? Bustos Melo. c/ /'_ --- Master in Applied Statistics (*) \(*) -- B.S. in Marine Biology -------------Science Faculty -------------Catholic University of Concepcion -------------Alonso de Ribera 2850 ? Concepci?n, Casilla 297 -------------Cell phone: +56 9 9 5939144
Hi Jos?,> Hi everyone, Im trying to make an analysis of multidimensional contingency > tables using R. I' working with the Agresti example where you have the > data from 3 categories. The thing is how can I do the analisys using the > G2 statistics. Somebody can send me an Idea?Please find below a link to an R companion for Agresti by Laura Thompson https://home.comcast.net/~lthompson221/Splusdiscrete2.pdf There are chances you find the example you would like to reproduce in there. HTH, Tobias