从文档中anova()
:
给定一系列对象后,“ anova”将按照指定的顺序对模型进行测试...
相互测试这些模型意味着什么?为什么顺序很重要?
这是GenABEL教程中的示例:
> modelAdd = lm(qt~as.numeric(snp1))
> modelDom = lm(qt~I(as.numeric(snp1)>=2))
> modelRec = lm(qt~I(as.numeric(snp1)>=3))
anova(modelAdd, modelGen, test="Chisq")
Analysis of Variance Table
Model 1: qt ~ as.numeric(snp1)
Model 2: qt ~ snp1
Res.Df RSS Df Sum of Sq Pr(>Chi)
1 2372 2320
2 2371 2320 1 0.0489 0.82
anova(modelDom, modelGen, test="Chisq")
Analysis of Variance Table
Model 1: qt ~ I(as.numeric(snp1) >= 2)
Model 2: qt ~ snp1
Res.Df RSS Df Sum of Sq Pr(>Chi)
1 2372 2322
2 2371 2320 1 1.77 0.18
anova(modelRec, modelGen, test="Chisq")
Analysis of Variance Table
Model 1: qt ~ I(as.numeric(snp1) >= 3)
Model 2: qt ~ snp1
Res.Df RSS Df Sum of Sq Pr(>Chi)
1 2372 2324
2 2371 2320 1 3.53 0.057 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
如何解释此输出?