von bele » Mo 11. Dez 2017, 17:44
Da ich R gerade noch offen habe und die Daten nun schon einmal eingelesen sind und ich dieses Vorgehen bislang nicht kenne, habe ich in der R Anleitung folgende zwei Varianten gefunden:
- Code: Alles auswählen
residuals
the Pearson residuals, (observed - expected) / sqrt(expected).
stdres
standardized residuals, (observed - expected) / sqrt(V), where V is the residual cell variance (Agresti, 2007, section 2.4.5 for the case where x is a matrix, n * p * (1 - p) otherwise).
Die Pearson residuals verhalten sich so:
- Code: Alles auswählen
> round( chisq.test(tag.m)$residuals, 2)
[,1] [,2] [,3] [,4] [,5]
[1,] 1.54 -2.19 -0.56 0.47 -0.06
[2,] 1.58 1.36 -1.55 0.31 -2.18
[3,] -0.23 0.14 0.39 0.19 -0.30
[4,] 2.08 -2.08 -0.43 0.11 -0.70
[5,] -3.47 1.51 1.77 -0.23 1.98
[6,] -1.46 -0.99 1.13 -1.63 3.10
[7,] -0.60 2.67 -0.57 0.76 -1.59
>
> abs( chisq.test(tag.m)$residuals) > 1.96
[,1] [,2] [,3] [,4] [,5]
[1,] FALSE TRUE FALSE FALSE FALSE
[2,] FALSE FALSE FALSE FALSE TRUE
[3,] FALSE FALSE FALSE FALSE FALSE
[4,] TRUE TRUE FALSE FALSE FALSE
[5,] TRUE FALSE FALSE FALSE TRUE
[6,] FALSE FALSE FALSE FALSE TRUE
[7,] FALSE TRUE FALSE FALSE FALSE
Die nachgenannten "standardisierten" verhalten sich so:
- Code: Alles auswählen
> round( chisq.test(tag.m)$stdres, 2)
[,1] [,2] [,3] [,4] [,5]
[1,] 2.07 -2.57 -0.65 0.55 -0.07
[2,] 2.16 1.61 -1.83 0.36 -2.68
[3,] -0.31 0.16 0.46 0.22 -0.36
[4,] 2.86 -2.48 -0.51 0.13 -0.86
[5,] -4.66 1.76 2.05 -0.27 2.39
[6,] -1.96 -1.16 1.32 -1.88 3.74
[7,] -0.80 3.07 -0.65 0.86 -1.90
> abs( chisq.test(tag.m)$stdres) > 1.96
[,1] [,2] [,3] [,4] [,5]
[1,] TRUE TRUE FALSE FALSE FALSE
[2,] TRUE FALSE FALSE FALSE TRUE
[3,] FALSE FALSE FALSE FALSE FALSE
[4,] TRUE TRUE FALSE FALSE FALSE
[5,] TRUE FALSE TRUE FALSE TRUE
[6,] FALSE FALSE FALSE FALSE TRUE
[7,] FALSE TRUE FALSE FALSE FALSE
Ich glaube, letzteres ist das, was Du empfohlen hast?
LG,
Bernhard
----
`Oh, you can't help that,' said the Cat: `we're all mad here. I'm mad. You're mad.'
`How do you know I'm mad?' said Alice.
`You must be,' said the Cat, `or you wouldn't have come here.'
(Lewis Carol, Alice in Wonderland)