I need to make a glm in the R, but there is dependence between the data. I was asked to enter this dependency as a random factor in the analysis. But I'm not getting a command for this.
Overview:
- GLM, binomial
- 2 response variables and 2 explanatory variables + random factor.
I've tried this:
modelo1<-glm(cbind(visitas,acertos)~cor_vantajosa*fase,random=~1|id,binomial(link="logit"),data=dados)
Any help is welcome!