AICを使った変数選択
> step(eq2,scope=list(upper=~x1+x2+x3+x4+x5+x6+x7+x8+x9+x10, lower=~1))
Start: AIC=-54.4
y ~ 1
Df Sum of Sq RSS AIC
+ x10 1 0.547 0.645 -64.694
+ x9 1 0.140 1.052 -54.894
+ x1 1 0.136 1.056 -54.823
<none> 1.192 -54.400
+ x6 1 0.076 1.116 -53.716
+ x7 1 0.040 1.152 -53.083
+ x5 1 0.013 1.179 -52.623
+ x8 1 0.005 1.187 -52.486
+ x3 1 0.005 1.187 -52.483
+ x2 1 0.002 1.190 -52.438
+ x4 1 0.001 1.191 -52.415
Step: AIC=-64.69
y ~ x10
Df Sum of Sq RSS AIC
+ x6 1 0.171 0.473 -68.868
+ x9 1 0.121 0.524 -66.845
<none> 0.645 -64.694
+ x4 1 0.045 0.599 -64.154
+ x3 1 0.036 0.609 -63.843
+ x2 1 0.028 0.617 -63.581
+ x5 1 0.028 0.617 -63.571
+ x8 1 0.015 0.630 -63.149
+ x1 1 0.013 0.632 -63.094
+ x7 1 0.004 0.641 -62.808
- x10 1 0.547 1.192 -54.400
Step: AIC=-68.87
y ~ x10 + x6
Df Sum of Sq RSS AIC
+ x9 1 0.064 0.410 -69.762
<none> 0.473 -68.868
+ x5 1 0.023 0.451 -67.849
+ x2 1 0.014 0.459 -67.481
+ x8 1 0.009 0.465 -67.249
+ x3 1 0.009 0.465 -67.237
+ x4 1 0.007 0.466 -67.179
+ x7 1 0.007 0.467 -67.150
+ x1 1 0.002 0.472 -66.941
- x6 1 0.171 0.645 -64.694
- x10 1 0.643 1.116 -53.716
Step: AIC=-69.76
y ~ x10 + x6 + x9
Df Sum of Sq RSS AIC
<none> 0.410 -69.762
- x9 1 0.064 0.473 -68.868
+ x5 1 0.015 0.395 -68.498
+ x2 1 0.014 0.396 -68.439
+ x4 1 0.012 0.398 -68.358
+ x3 1 0.008 0.401 -68.176
+ x8 1 0.005 0.405 -67.993
+ x7 1 0.001 0.409 -67.811
+ x1 1 0.001 0.409 -67.797
- x6 1 0.114 0.524 -66.845
- x10 1 0.606 1.016 -53.607
Call:
lm(formula = y ~ x10 + x6 + x9)
Coefficients:
(Intercept) x10 x6 x9
-0.08175 0.42292 -0.26926 0.19888