Hi,
 
Sorry for the duplicate emails and many thanks for your advice on the way to measure the goodness of fit of a mixed model. Since lmer function allow the model fitting with no error structure.
 
I was wondering if there is any function to calculate the R2 from a mixed model with AR(1) error structure and would like to thank you in advance for any suggestions.
 
Thanks


________________________________
From: Thomas Petzoldt <Thomas.Petzoldt@TU-Dresden.de>

Sent: Wednesday, November 16, 2011 6:41 PM
Subject: Re: [R-sig-ME] goodness of fit

On 11/16/2011 7:13 PM, FMH wrote:
> Dear All,
>
> Could anybody please advice me the way to check the goodness of fit
> of the linear mixed-effects model and thank you in advance for your
> assistance.

[[elided Yahoo spam]]

You may also try one of the following:

library(lme4)
?lmer

example(lmer)

# deviance, AIC, BIC, log likelihood
summary(fm2)


## log likelihood
logLik(fm2)

## Akaike information criterion
AIC(fm2)

## sum of squared residuals
sum(residuals(fm2)^2)

## or if you insist to have R^2
with(sleepstudy, 1 - var(residuals(fm2))/var(Reaction))
	[[alternative HTML version deleted]]


