Skip to content
Prev 246076 / 398513 Next

Different results in glm() probit model using vector vs. two-column matrix response

On Dec 30, 2010, at 22:01 , Lensing, Shelly Y wrote:
(Once will do...)
Easy: When given in the binary form, glm() has no way to know that your data comes from 10 homogenous groups (consider extending the model with a covariate like z <- runif(80) ). So the "saturated model" is simply bigger. To  recover the 7 DF deviance, interject a model that represents the the 10 groups (i.e., unit <- gl(10,8); fu <- glm(y~unit,.....); anova(fu, f180),  provided that I follow your code correctly).