[R-sig-ME] R^2 for lme
Balázs Lestár
ebszolocsucsor at freemail.hu
Mon Apr 6 19:09:30 CEST 2009
Dear All,
Can anybody tell me how to get the R^2 and adjusted R^2 for an lme object?
I found a formula, but when I checked it with an lm function, it didn't return the same result like summary(lm.model)$ r.squared.
l.B <- logLik (lme.model)
l.0 <- logLik ( lme ( y~ 1, random= ~1| a / b ) )
Rsq <- 1 - exp( - ( 2 / length(y ) * (l.B - l.0) ) )
Is there any packages that can help me?
More information about the R-sig-mixed-models
mailing list