比较R中的两个回归模型

时间:2019-03-13 01:47:10

标签: r regression

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"])

我尝试使用modelgf比较modelgf2anova(m1,m2)模型。但是,我收到警告消息:

In anova.lmlist(object, ...) :
  models with response ‘"age20[, \"igf1\"]"’ removed because response differs from model 1

还有其他方法可以比较这两个模型吗?

0 个答案:

没有答案