Skip to content
Prev 5794 / 20628 Next

AIC in nlmer

Helen Sofaer <helen at ...> writes:
I'm working on this, but a quick answer just to get back to you:
I suspect this is a bug in nlmer.

  The Details section of ?nlmer says:

"... the ?nAGQ? argument only applies to calls to ?glmer?."

  However, this doesn't in practice seem to be true -- nlmer
is doing *something* different when nAGQ>1 ... more disturbingly,
the answer from AGQ=5 agrees with nlme (which in the absence of
other evidence I would take to be correct).  lme4 thinks it got a 
slightly better answer than nlme, but that may be due to a difference 
in the way the log-likelihoods are calculated (i.e. different additive
constants).

sapply(fitlist,logLik)
        nlme lme4_Laplace    lme4_AGQ5 
   -131.5846    -945.3120    -129.8548 


  Coefficients shown below (extracted using some code I've been
extending from stuff in the arm package; it's the same information 
as in summary(), just a bit more compact).

  The fixed effect estimates are all pretty much the same
(not quite trivial differences, but all << the standard error)

  If I were you, until this gets sorted out, I would definitely
use nlme (which is much better tested), unless you need something
nlmer supplies (e.g. crossed random efffects, speed?).  

 Thanks for the report: while I will probably only be poking around
the edges of this, I will presume on behalf of Doug Bates to encourage
you to keep reporting issues, and to check back if you don't see
any improvements coming out.

  In the meantime, I have two reading suggestions.  On AIC:

Greven, Sonja, and Thomas Kneib. 2010. ?On the Behaviour of Marginal
and Conditional Akaike Information Criteria in Linear Mixed Models.?
Biometrika 97 (4):
773-789. <http://www.bepress.com/jhubiostat/paper202/>.

  They focus slightly more on conditional AIC (rather than the
marginal AICs which nlme/lme4 report), while I think the marginal
AIC is more applicable to your case, but they give a nice discussion
of the issues with AIC in the mixed-model case.

  Also, if you're interested in reading more about the particular
case of the orange trees, Madsen and Thyre have a nice section at the
end:

Madsen, Henrik, and Poul Thyregod. 2010. Introduction to General and
Generalized Linear Models. 1st ed. CRC Press.


  cheers
    Ben Bolker

=============
$nlme
     Estimate Std. Error
Asym 191.0501     16.154
xmid 722.5598     35.152
scal 344.1687     27.148
4     31.4826         NA
5      7.8463         NA

$lme4_Laplace
             Estimate Std. Error
Asym          192.041    104.086
xmid          727.891     31.966
scal          347.968     24.416
sd.Tree.Asym  232.349         NA
sd.resid        7.271         NA

$lme4_AGQ5
             Estimate Std. Error
Asym          192.059     15.585
xmid          727.934     34.443
scal          348.092     26.310
sd.Tree.Asym   31.647         NA
sd.resid        7.843         NA