Skip to content

AIC in lmer

3 messages · Richard Chandler, Douglas Bates, vito muggeo

#
Hello all,

Is AIC calculated incorrectly in lmer? It appears as though it uses
AIC = -2*logLik - 2*#parms, instead of -2*LogLik + 2*#parms? Below is
output from one of many models I have tried:

Generalized linear mixed model fit using PQL 
Formula: cswa ~ pcov.ess1k + (1 | year) 
   Data: ptct50.5 
 Family: poisson(log link)
      AIC    BIC    logLik deviance
 224.8466 219.19 -114.4233 228.8466
Random effects:
     Groups        Name    Variance    Std.Dev. 
       year (Intercept)   0.0062643    0.079147 
# of obs: 125, groups: year, 2

Estimated scale (compare to 1)  1.277183 

Fixed effects:
              Estimate Std. Error  z value Pr(>|z|)
(Intercept) -0.1059628  0.1283976 -0.82527   0.4092
pcov.ess1k   0.0101182  0.0093962  1.07683   0.2816


A snip of my data:

      cswa pcov.ess250 year
  [1,]    4        7.14 2004
  [2,]    4       19.26 2003
  [3,]    1        3.66 2004

I'm using R 2.1.1 with Windows XP.

Thanks,
Richard
#
The calculation is being done in

                  print(data.frame(AIC = AIC(llik), BIC = BIC(llik),
                               logLik = c(llik),
                               deviance = -2*llik,
                               row.names = ""))

where llik is defined as

              llik <- object at logLik

so the important question is whether the logLik slot has the correct
values for the number of parameters.

By the way, why are you calculating a random effect for year when you
only have two years of data? The estimate of the variance of that
random effect will have almost no precision.
On 10/7/05, Richard Chandler <rchandler at forwild.umass.edu> wrote:
#
Hi,
my reply just concerns the usage of AIC in mixed models and not the lmer 
package.

The "standard" AIC is actually unconditional.

Vaida and Blanchard (2003, Proceeding 19 IWSM,101-105) discuss that a 
"conditional" version should be more appropriate in a mixed framework.

I don't whether the paper has been pubblished elsewhere.

regards,
vito
Richard Chandler wrote: