# 9766 adjusted r squared 09726 f statistic 2402 on 4

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.9307 on 23 degrees of freedom Multiple R-Squared: 0.9766, Adjusted R-squared: 0.9726 F-statistic: 240.2 on 4 and 23 DF, p-value: < 2.2e-16 > plot(fit3\$fitted.values,fit3\$residuals) > abline(h=0,lty=2) > predict.lm(fit3,data.frame(Speed=55),interval=c("prediction"),level=0.95) fit lwr upr [1,] 18.31717 16.28547 20.34887 > plot(Speed, MPG) > y3 = fit3\$coeff[1] + fit3\$coeff[2]*x + fit3\$coeff[3]*x^2 + fit3\$coeff[4]*x^3 + fit3\$coeff[5]*x^4 > lines(x,y3) > par(mfrow=c(2,2)) > plot(fit) > plot(fit2) > plot(fit3) > shapiro.test(fit3\$residuals) Shapiro-Wilk normality test data: fit3\$residuals W = 0.9822, p-value = 0.9 > fit4 = lm(MPG ~ Speed + I(Speed^2) + I(Speed^3) + I(Speed^4) + I(Speed^5) + I(Speed^6)) > summary(fit4) Call: lm(formula = MPG ~ Speed + I(Speed^2) + I(Speed^3) + I(Speed^4) + I(Speed^5) + I(Speed^6)) Residuals: Min 1Q Median -1.1129 -0.5717 -0.1707 3Q 0.5025 Max 1.5288 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.421e+01 1.204e+01 -1.180 0.2514 Speed 4.203e+00 2.553e+00 1.646 0.1146 I(Speed^2) -3.521e-01 2.012e-01 -1.750 0.0947 . I(Speed^3) 1.579e-02 7.691e-03 2.053 0.0527 . I(Speed^4) -3.473e-04 1.529e-04 -2.271 0.0338 * I(Speed^5) 3.585e-06 1.518e-06 2.362 0.0279 * I(Speed^6) -1.402e-08 5.941e-09 -2.360 0.0280 * --Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.8657 on 21 degrees of freedom Multiple R-squared: 0.9815, Adjusted R-squared: 0.9762 F-statistic: 186 on 6 and 21 DF, p-value: < 2.2e-16 > plot(fit4\$fitted.values,fit4\$residuals) > abline(h=0,lty=2) > plot(Speed, MPG) > y4 = fit4\$coeff[1] + fit4\$coeff[2]*x + fit4\$coeff[3]*x^2 + fit4\$coeff[4]*x^3 + fit4\$coeff[5]*x^4 + fit4\$coeff[6]*x^5 + fit4\$coeff[7]*x^6 > lines(x,y4) &...
View Full Document

## This note was uploaded on 04/03/2014 for the course STAT 420 taught by Professor Stepanov during the Spring '08 term at University of Illinois, Urbana Champaign.

Ask a homework question - tutors are online