Skip to content
Prev 3833 / 20628 Next

Likelihood ratios

After posting this, I thought to contact Pete Dixon himself and indeed
it seems he already coded the functions to obtain a likelihood ratio
comparing two lmer models:

AIC_lmer = function(x){
	require(lme4)
	print(formula(attr(x,"call")))
	summary(x)@AICtab
}

LR_lmer = function(m0,m1){
	exp((AIC_lmer(m0)[[1]]-AIC_lmer(m1)[[1]])/2)
}

#example usage:
LR_lmer( my_fit1 , my_fit2 )
On Tue, Jun 1, 2010 at 1:50 PM, Mike Lawrence <Mike.Lawrence at dal.ca> wrote: