age25=subset(juul,juul[,"age"]>25.00)## create a subset of age greater than 25
modelgf=lm(age25[,"igf1"]~age25[,"age"])
age20=subset(juul,juul[,"age"]<20.00)
modelgf2=lm(age20[,"igf1"]~age20[,"age"])
I tried to compare the modelgf
and modelgf2
models using anova(m1,m2)
. However, I get a warning message:
In anova.lmlist(object, ...) :
models with response ‘"age20[, \"igf1\"]"’ removed because response differs from model 1
Are there any other ways to compare these two models?