Hello Simone, Given that your response variable is binary and, consequently, you should use generalized models, just occurs to me a comparison between a Generalized Linear Model (the model without the random effect) and a Generalized Linear Mixed Model (the model with the random effect).
You could write them as follows: no.random.model <- glm(sex ~ hwp + hcp, data = mydata, family=binomial) random.model <- glmer(sex ~ hwp + hcp + (1 | colony), data = mydata, family=binomial) My only doubt here is if one can directly compare both models, built under different algorithms and from different packages. Furthermore, I have no idea if the function 'anova' is able to compare models produced by the 'glmer' function. One possibility is to compare them based on Akaike Information Criteria (AIC) or any one of its corrected versions. I hope it helps you. best wishes -- Gustavo Requena PhD student - Laboratory of Arthropod Behavior and Evolution Universidade de São Paulo Correspondence adress: a/c Glauco Machado Departamento de Ecologia - IBUSP Rua do Matão - Travessa 14 no 321 Cidade Universitária, São Paulo - SP, Brasil CEP 05508-900 Phone number: 55 11 3091-7488 http://ecologia.ib.usp.br/opilio/gustavo.html [[alternative HTML version deleted]]
______________________________________________ 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.