好文档 - 专业文书写作范文服务资料分享网站

R语言代码试题答案步骤

天下 分享 时间: 加入收藏 我要投稿 点赞

> res=residuals(lm)

> dy=step(lm) Start: AIC=

y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9

Df Sum of Sq RSS AIC - x4 1 21 3184326 - x9 1 17149 3201454 - x7 1 17700 3202005 - x8 1 54295 3238599 - x6 1 89586 3273891 3184305 - x3 1 2662593 5846898 - x2 1 4561056 7745361 - x5 1 9377500 - x1 1

Step: AIC=

y ~ x1 + x2 + x3 + x5 + x6 + x7 + x8 + x9

Df Sum of Sq RSS AIC - x9 1 17428 3201754 - x7 1 18563 3202889 - x8 1 54437 3238763 - x6 1 91813 3276139 3184326 - x3 1 2936130 6120456 - x2 1 5467941 8652267 - x5 1 9393345 - x1 1

Step: AIC=

y ~ x1 + x2 + x3 + x5 + x6 + x7 + x8

Df Sum of Sq RSS AIC - x7 1 34634 3236387 - x6 1 74800 3276554 - x8 1 82150 3283904 3201754

- x3 1 3055353 6257107 - x2 1 5725836 8927590 - x5 1 9382624 - x1 1

Step: AIC=

y ~ x1 + x2 + x3 + x5 + x6 + x8

Df Sum of Sq RSS AIC - x8 1 70813 3307201 - x6 1 152777 3389165 3236387 - x3 1 5501284 8737672 - x2 1 8895049 - x5 1 9458098 - x1 1

Step: AIC=

y ~ x1 + x2 + x3 + x5 + x6

Df Sum of Sq RSS AIC - x6 1 137540 3444741 3307201 - x3 1 5771063 9078264 - x2 1 8871193 - x5 1 9473521 - x1 1

Step: AIC=

y ~ x1 + x2 + x3 + x5

Df Sum of Sq RSS AIC 3444741 - x3 1 5717883 9162624 - x2 1 - x5 1 - x1 1 > summary(dy) Call:

lm(formula = y ~ x1 + x2 + x3 + x5, data = h)

Residuals:

Min 1Q Median 3Q Max

Coefficients:

Estimate Std. Error t value Pr(>|t|) (Intercept) ** x1 *** x2 *** x3 *** x5 *** ---

Signif. codes: 0 ‘***’ ‘**’ ‘*’ ‘.’ ‘ ’

Residual standard error: 364 on 26 degrees of freedom Multiple R-squared: , Adjusted R-squared: F-statistic: on 4 and 26 DF, p-value: <

1

R语言代码试题答案步骤

>res=residuals(lm)>dy=step(lm)Start:AIC=y~x1+x2+x3+x4+x5+x6+x7+x8+x9DfSumofSqRSSAIC-x41213184326-x91
推荐度:
点击下载文档文档为doc格式
91hat23wc59jajr88ky455t2h95x5500wbz
领取福利

微信扫码领取福利

微信扫码分享