> >>> I'm using chisq.test() on a matrix of categorical data, and I see > >>> that the > >>> "residuals" attribute of the returned object will give me the > >>> Pearson residuals. > > Actually they are not an attribute in the R sense, but rather a list > value.
Oh. I was just going by: > attributes(my.chisq.test) $names [1] "statistic" "parameter" "p.value" "method" "data.name" "observed" [7] "expected" "residuals" $class [1] "htest" which I interpreted as "this object has 8 attributes, called 'statistic', 'parameter', ..., 'residuals'." Is that not the right terminology? > >>> That's cool. However, what I'd really like is the standardized > >>> (adjusted) > >>> Pearson residuals, which have a N(0,1) distribution. Is there a > >>> way to do that > >>> in R (other than by me programming it myself?) > >> > >> ?scale > > > > chisq.test(...)$stdres, more likely. "scale" is not what I want. As for "$stdres," that would be wonderful, but as you can see from the above list of attributes, it's not one of the 8 returned. What am I missing? - Stephen ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.