how to know if random factors are significant?
On 01/04/2008, Leonel Arturo Lopez Toledo <llopez at oikos.unam.mx> wrote:
Dear all: I'm new to mixed models and I'm trying to understand the output from "lme" in the nlme package. I hope my question is not too basic for that list-mail. Really sorry if that is the case.
No need to be sorry. It seems though, that you are also using lmer.
Especially I have problems to interpret the random effect output. I have only one random factor which is "Site". I know the "Variance and Stdev" indicate variation by the random factor, but are they indicating any significance? Is there any way to obtain a p-value for the random effects? And in case is not significant, how can I remove it from the model? With "update (model,~.-)"?
In the case of lme, there is no indication of the significance of the variance parameters in the standard output. To test the variance component you fit another model excluding that parameter, which i guess is why you come to think of update(). It is however not possible to fit a model with lme, that does not contain any random effects, hence you have to fit a linear model by lm (or gls in package nlme in case other non-standard stuff is at stake) and make the likelihood ratio test with anova( fm.lme, fm.lm). Note that order of the arguments to anova matters in this case (cf ?anova.lme). To obtain a p-value, you need to compare with some distribution and a chi-square with one df is the default output. Often however a mixture of 0 and 1 df's are more appropriate, hence a more correct p-value is half the one, the software reports. You can check these distributions by the simulate function in the nlme package. When you have more than one random effect in you model, update works just fine. You should consult the book: Mixed-Effects Models in S and S-plus by Pinheiro and Bates for further details.
The variance in first case (see below) is very low and in the second example is more considerable, but should I consider in the model or do I remove it?
The variance parameter in the first model indeed seems rather small compared to residual variation. The latter model is incomparable to the former model, since it is a binomial(logit) GLMM. The obvious thing to do would be to compare the deviance of this model, with the corresponding GLM (I am however unsure of how the constant terms in the likelihood are handled by glm and lmer in this case, so comparison is perhaps not simple) without the variance component, but then again, the interpretation of the fixed effect parameters change, so other issues should also have a say in choosing an appropriate model. Best Rune
Thank you very much for your help in advance.
EXAMPLE 1
Linear mixed-effects model fit by maximum likelihood
Data: NULL
AIC BIC logLik
277.8272 287.3283 -132.9136
Random effects:
Formula: ~1 | Sitio
(Intercept) Residual
StdDev: 0.0005098433 9.709515
EXAMPLE 2
Generalized linear mixed model fit using Laplace
Formula: y ~Canopy*Area + (1 | Sitio)
Data: tod
Family: binomial(logit link)
AIC BIC logLik deviance
50.93 54.49 -21.46 42.93
Random effects:
Groups Name Variance Std.Dev.
Sitio (Intercept) 0.25738 0.50733
number of obs: 18, groups: Sitio, 6
Leonel Lopez
Centro de Investigaciones en Ecosistemas-UNAM
MEXICO
--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que est? limpio.
For all your IT requirements visit: http://www.transtec.co.uk
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models