Hi




I need a help with testing goodness of fit for Generalized linear mixed model. 
It seems there is no solid way of doing it, but I'd like to make sure the model is a good fit. 




My model is 




model1 <- glmer(cbind(CorrectHits,12-CorrectHits)~ ADHDYN*Condition + (1 |ī..ID),


                data = bert, family="binomial")




where ADHDYN has a 2 levels 
and 3 levels in Condition, and interaction. (so 6 fixed effect 
parameters). We have allowed random inetrcept for individuals. The 
number of observation is 258. 




I tried to carry our the 
goodness of fit test by using chi-square test, but I get 0 as a answer 
so I am not sure if I did right. 





# The degrees of freedom is obtained by number of obs - number of fixed params


df <- length(bert$ī..ID)-6;df


1-pchisq(952.5144 , df=251) # The output was 0




Any better way of testing the goodness of fit?




We carried out the same model
 but with glm, but we want to compare which model gives us smaller 
Satandard error. The estimate of coefficients were very similay between 
GLm and GLMM models. 







Thanks in advance
Yuki  		 	   		  
	[[alternative HTML version deleted]]

