Re: [R] AICs from lmer different with summary and anova

2009-04-19 Thread Ben Bolker
hadley wrote: > >> Am I doing something wrong, here? If not, which are the real AIC and >> logLik >> values for the different models? > > The difference here is that summary() is using REML=TRUE and anova() is using REML=FALSE. It makes sense that anova (which is typically being used to c

Re: [R] AICs from lmer different with summary and anova

2009-04-19 Thread hadley wickham
> Am I doing something wrong, here? If not, which are the real AIC and logLik > values for the different models? I don't think it's reasonable to expect that the log-likelihood computed by different functions be should comparable. Are the constant terms included or dropped? Hadley -- http://ha

Re: [R] AICs from lmer different with summary and anova

2009-04-19 Thread Michael Dewey
At 16:22 15/04/2009, Jonathan Williams wrote: Dear R Helpers, I have noticed that when I use lmer to analyse data, the summary function gives different values for the AIC, BIC and log-likelihood compared with the anova function. I do not think I have seen a reply to this. What happens if you

[R] AICs from lmer different with summary and anova

2009-04-15 Thread Jonathan Williams
Dear R Helpers, I have noticed that when I use lmer to analyse data, the summary function gives different values for the AIC, BIC and log-likelihood compared with the anova function. Here is a sample program #make some data set.seed(1); datx=data.frame(array(runif(720),c(240,3),dimnames=list(NUL