[R-sig-ME] Graphical validation of residuals of two models or their AICc?

Timothy MacKenzie |@w|@wt @end|ng |rom gm@||@com
Sat Jan 14 20:44:57 CET 2023


Dear All,

I'm deciding between two candidate models (m1 and m2). AICc shows that m2
is to be preferred over m1.

However, when I plot the residuals of m1 and m2, residuals of m1 look more
reasonable than those of m2.

I wonder which criteria to rely on to choose my model: graphical validation
of residuals of the two models or their AICc?

Thank you,
Tim M
#-----------------------------------------#
dat <- read.csv("https://raw.githubusercontent.com/fpqq/w/main/c.csv")
dat <- transform(dat, time = factor(time))

library(nlme)
m1 <- lme(score ~ time*cal,
random = list(id = pdDiag(~cal +0)),
data = dat,
weights = varIdent(form = ~ cal:time),
control = lmeControl(msMaxIter  = 2e2))

m2 <- lme(score ~ time*cal,
          random = list(id = pdDiag(~cal:time +0)),
          data = dat,
          weights = varIdent(form = ~ cal:time),
          control = lmeControl(msMaxIter  = 2e2))

library(bbmle)

AICctab(m1, m2)

plot(m1)
plot(m2)
#-----------------------------------------#

	[[alternative HTML version deleted]]



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