[R-sig-ME] lme4 and calculating QAICc

Ben Bolker bolker at ufl.edu
Thu Feb 11 18:32:33 CET 2010


 [cc'ing back to r-sig-mixed-models so it gets archived somewhere]

Marcus Rowcliffe wrote:
> Many thanks Ben
> 
> The squaring of the scale parameter is a bit of a surprise! It seems to
> give sensible results (see below *), but I can't immediately see why
> it's necessary - is there an obvious explanation?

  Because c-hat is supposed to be on the same scale as the deviance --
the deviance is essentially on a variance, or sum-of-squares scale, not
a standard deviation/root-mean-square scale.  @sigma is defined as a
standard deviation, not a variance.

  For what it's worth, Doug Bates has said in the past that he's not
*sure* that sigma really corresponds to the same quantity that we would
want to use as sqrt(c-hat) -- it seems reasonable, but no-one to my
knowledge has either sat down and worked through it carefully *or*
tested with simulations.

> I've also noted in Burnham and Anderson that when using QAIC to compare
> a set of models, they recommend that the scale estimate of the full
> model should be used to correct all models, rather than each model's own
> estimate. Again, this does seem to give sensible results, whereas
> applying scale estimates model-by-model can give very different and less
> apparently sensible results (including complete reversals of what's
> deemed the best model), so it seems crucial to get this right. Do you
> have a view on this? 

  I believe B&A are right.

I'd value you your opinion on whether you think the
> following is a sensible QAIC function for comparing multiple lmer models
> with different fixed effects:
> 
> qaic <- function(...)
> {	mods <- list(...)
> 	LL <- lapply(mods,logLik)
> 	df <- as.numeric(lapply(LL,attr,"df"))
> 	nfixef <- as.numeric(lapply(mods,function(mm)
> length(fixef(mm))))
> 	scale <- summary(mods[[which(nfixef==max(nfixef))]])@sigma^2
> 		#assumes only one model with max(nfixef) - needs error
> catching
> 	2*df - 2*as.numeric(LL)/scale
> }

  Seems reasonable.

> 
> * By sensible I mean that I've tested QAIC comparisons for simple lmer
> models varying in fixed structure, and using the squared scale estimate
> from the full model, the outcome seems to reflect what I would expect
> from eyballing coeficients and SEs
> 
> Best
> Marcus
> 
>




More information about the R-sig-mixed-models mailing list