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.

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

Reply via email to