在 R 中,drop1
命令输出一些简洁的东西。
这两个命令应该会给你一些输出:
example(step)#-> swiss
drop1(lm1, test="F")
我的看起来像这样:
> drop1(lm1, test="F")
Single term deletions
Model:
Fertility ~ Agriculture + Examination + Education + Catholic +
Infant.Mortality
Df Sum of Sq RSS AIC F value Pr(F)
<none> 2105.0 190.69
Agriculture 1 307.72 2412.8 195.10 5.9934 0.018727 *
Examination 1 53.03 2158.1 189.86 1.0328 0.315462
Education 1 1162.56 3267.6 209.36 22.6432 2.431e-05 ***
Catholic 1 447.71 2552.8 197.75 8.7200 0.005190 **
Infant.Mortality 1 408.75 2513.8 197.03 7.9612 0.007336 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
这一切意味着什么?我假设“星星”有助于决定要保留哪些输入变量。看上面的输出,我想扔掉“考试”变量,专注于“教育”变量,这样解释正确吗?
另外,AIC 值越低越好,是吗?
埃德。请注意下面的社区 Wiki 答案,如果您认为合适,请添加到其中,以澄清此输出。