[R] GLM outputs in condensed versus expanded table
francogrex
francogrex at mail.com
Wed Aug 25 17:17:20 CEST 2010
Hi I'm having different outputs from GLM when using a "condensed" table
V1 V2 V3 Present Absent
0 0 0 3 12
0 0 1 0 0
0 1 0 0 0
0 1 1 1 0
1 0 0 7 20
1 0 1 0 0
1 1 0 3 0
1 1 1 6 0
resp=cbind(Present, Absent)
glm(resp~V1+V2+V3+I(V1*V2*V3),family=binomial)
>Deviance Residuals:
[1] 0 0 0 0 0 0 0 0
etc and also coefficients...
And when using the same but "expanded" table
V1 V2 V3 condition (1 present 0 abscent)
Id1 1 0 0 1
id2 1 1 1 1
... etc
glm(condition~V1+V2+V3+I(V1*V2*V3),family=binomial)
>Deviance Residuals:
Min 1Q Median 3Q Max
-0.7747317 -0.7747317 -0.6680472 0.0001315 1.7941226
and also coefficients are different from above.
What could I be doing wrong?
--
View this message in context: http://r.789695.n4.nabble.com/GLM-outputs-in-condensed-versus-expanded-table-tp2338407p2338407.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list