[R-sig-ME] difference in lmer results with REML = FALSE and refitML

Henrik Singmann henrik.singmann at psychologie.uni-freiburg.de
Thu May 8 16:33:27 CEST 2014


Dear list,

based on a question on the sister list for linguistics (http://thread.gmane.org/gmane.comp.lang.r.linguistics/844/focus=846) I came across some weird inconsistcneis when comparing a lmer fit with REML = FALSE and the same model first fitted with REML and then refitted with ML. The strange behavior is that both ML fits do not agree. This seems to be somewhat unexpected.

See case below.

Cheers,
Henrik

PS: I will only irregularly check my mails in the next days but wanted to let you know nevertheless.


require(lme4)
ddat = read.delim("http://www.ccunix.ccu.edu.tw/~lngproc/doramiR.txt")
ddat = na.omit(ddat)

contrasts(ddat$Education) = contr.sum(levels(ddat$Education)) # 1 = College
contrasts(ddat$SynCat) = contr.sum(levels(ddat$SynCat)) # 1 = Noun
contrasts(ddat$Freq) = contr.sum(levels(ddat$Freq)) # 1 = High

ddat$Education = 2*(ddat$Education=="College")-1


reml <- lmer(RT~ (Education*SynCat)+(Education*SynCat):Freq+((SynCat*Freq)|Participant)+(Education|Item),data = ddat)
ml2 <- refitML(reml)
summary(ml2)
## Linear mixed model fit by maximum likelihood  ['lmerMod']
## Formula: RT ~ (Education * SynCat) + (Education * SynCat):Freq + ((SynCat *      Freq) | Participant) + (Education | Item)
##    Data: ddat
##
##      AIC      BIC   logLik deviance df.resid
##   5119.3   5202.4  -2538.7   5077.3      365
## ...

ml <- lmer(RT~ (Education*SynCat)+(Education*SynCat):Freq+((SynCat*Freq)|Participant)+(Education|Item),data = ddat, REML = FALSE)
summary(ml)
## Linear mixed model fit by maximum likelihood  ['lmerMod']
## Formula: RT ~ (Education * SynCat) + (Education * SynCat):Freq + ((SynCat *      Freq) | Participant) + (Education | Item)
##    Data: ddat
##
##      AIC      BIC   logLik deviance df.resid
##   5122.1   5205.1  -2540.0   5080.1      365
## ...


-- 
Dr. Henrik Singmann
Albert-Ludwigs-Universität Freiburg, Germany
http://www.psychologie.uni-freiburg.de/Members/singmann



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