library(nlme)
fm1 <- nlme(height ~ SSasymp(age, Asym, R0, lrc),
data = Loblolly,
fixed = Asym + R0 + lrc ~ 1,
random = Asym ~ 1,
start = c(Asym = 103, R0 = -8.5, lrc = -3.3))
summary(fm1)
fm2 <- update(fm1, random = pdDiag(Asym + lrc ~ 1))
summary(fm2)
anova(fm1, fm2)
Model df AIC BIC logLik Test L.Ratio p-value
fm1 1 5 239.4856 251.6397 -114.7428
fm2 2 6 238.9662 253.5511 -113.4831 1 vs 2 2.519406 0.1125
I'm trying to see which model is preferred using an LRT. Here the p-value is > 0.05, so I fail to reject the null hypothesis and conclude that the smaller model fm1
is sufficient. And if the p-value were < 0.05, then I would conclude that the larger model fm2
is preferred. However, from reading this post, the top answer states that "the model with the least df gets preferred in case of a significant difference." So...does this mean that if p-value < 0.05, fm1
would be preferred?