Hi everybody,

If I am correct, you can compare a model with random effect with the same model 
without the random effect by using the nlme function, like this:

no.random.model <- gls(Richness ~ NAP * fExp,
              method = "REML", data = RIKZ)
random.model <- lme(Richness ~NAP * fExp, data = RIKZ,
          random = ~1 | fBeach, method = "REML")
anova(no.random.model,random.model)

But, nlme is valid only for the gaussian family, isn't it? In my case I have a 
mixed model with binomial family, like this:

random.model <- lme(sex ~hwp+hcp, data = mydata,

          random = ~1 | colony, method = "REML")

where "sex" is a binary variable, "hwp" and "hcp" are continuous variable and 
"colony" is a factor with two levels.
I want to compare this model with another one without the random effect, I have 
tried with the lme4 but after this I cannot figure out how to build this same 
model without the random effect in order to make it comparable to the random 
effect model.

Thanks for any help.
Simone  

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

Reply via email to