[R] a fast way to get AIC, BIC and logLik?

Esmail esmail.js at gmail.com
Tue Feb 16 01:25:57 CET 2010

Hello all,

Disclaimer, I know very little about statistics :-|

I am running a series of regressions for friends, the goal being to
determine the AIC, BIC and logLik values from the result/summary of
each regression. We are doing this as part of an evolutionary
algorithm, so it is important that the regression step be as quick as

We initially used the Zelig library, but this was running rather slow
(we may have up to 210 variables in our equation).

The call looked like this:

IndContr_1 <- zelig(Y ~ var1 + var2 + .. + varN +tag(1|Group), data=Dataset, 

My friends then suggested using the nlme library instead, so our call
looks like this now:

IndContr_2 <- lme(Y ~ var1 + var2 + .. varN, random=~1|Group, data=Dataset)

This runs much faster, in about 25-30% of the time of the zelig (at least my
preliminary timing seems to indicate this)

Is there a faster way yet to get the AIC/BIC/logLik values? (I hope
this question makes sense)


More information about the R-help mailing list