[Rd] mixed effects model and r-squared
bolker at zoo.ufl.edu
Fri Dec 8 15:34:47 CET 2006
Indermaur Lukas <Lukas.Indermaur <at> eawag.ch> writes:
> I am fitting linear mixed effects model in R [snip]
> ts.model <- lme(LOG_FOC_MW ~ R_DN_SUM + ANIMAL + SEX+ YY, data = t.data,
random = ~ 1 | ANIMAL,
> correlation=corCAR1(0.2, form = ~1 | ANIMAL ),
> Is there a possability to easly compute an R-square
from the output of the
> I would appreciate any hint.
> Best regards
You probably need to repost this on r-help instead of r-devel;
it's not a "development" question.
The other bad news for you is that I suspect it may be
difficult to define r-squared uniquely for a mixed model.
The resid() command will give you
residuals, and you could take (1-resid()^2)/var(x) --
but how do you decide which var(x) to put in
the denominator ... ?
More information about the R-devel