[R-sig-ME] compare two GAMM4 models using AICs
dani
orchidn at live.com
Tue Oct 24 21:49:50 CEST 2017
Hello everyone,
I am fitting two gamm4 models because I would like to see whether there is justification for including a spline term for x1. Can this be done by comparing the AICs for the underlying mixed models (i.e., the "mer" part) of the two models?
b1 <- gamm4(y~x1+offset(e),data=dat,random=~(1|fac))
b2 <- gamm4(y~x1+s(x1)+offset(e),data=dat,random=~(1|fac))
summary(b1$gam)
summary(b1$mer)
summary(b2$gam)
summary(b2$mer)
AIC(b1$mer)
AIC(b2$mer)
Thank you very much!
Best,
DaniNM
<http://aka.ms/weboutlook>
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list