[R] anova applied to a lme object
José Rafael Ferrer Paris
jr_frrr at yahoo.de
Wed Mar 7 17:16:13 CET 2007
The variances of the random effects and the residual variances are given
by the summary function. Maybe VarCorr or varcomp gives you the answer
you are looking for:
library(nlme)
library(ape)
?VarCorr
?ape
JR
El mié, 07-03-2007 a las 13:09 +0100, Berta escribió:
> Hi R-users,
>
> when carrying out a multiple regression, say lm(y~x1+x2), we can use an
> anova of the regression with summary.aov(lm(y~x1+x2)), and afterwards
> evaluate the relative contribution of each variable using the global Sum of
> Sq of the regression and the Sum of Sq of the simple regression y~x1.
>
> Now I would like to incorporate a random effect in the model, as some data
> correspond to the same region and others not: mylme<- lme(y~x1+x2, random=
> ~1|as.factor(region)). I would like to know, if possible, which is the
> contribution of each variable to the global variability. Using anova(mylme)
> produce an anova table (without the Sum of Sq column), but I am not sure how
> can I derive the contribution of each variable from it, or even whether it
> is nonsense to try, nor can I derive a measure of how much variability is
> left unexplained.
>
> Sorry for the type of question, but I did not find a simple solution and
> some researchers I work with love to have relative contributions to global
> variability.
>
> Thanks a lot in advance,
>
> Berta
>
>
>
> >
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
--
Dipl.-Biol. JR Ferrer Paris
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laboratorio de Biología de Organismos --- Centro de Ecología
Instituto Venezolano de Investigaciones Científicas (IVIC)
Apdo. 21827, Caracas 1020-A
República Bolivariana de Venezuela
Tel: (+58-212) 504-1452
Fax: (+58-212) 504-1088
email: jferrer at ivic.ve
clave-gpg: 2C260A95
More information about the R-help
mailing list