Dat summarycentfit1 call lmformula y x ix2

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 304 640 7 308 590 8 315 560 > xbar = mean(cent.dat[,1]) > xbar [1] 297 > cent.dat$xcent = cent.dat$x - xbar > cent.dat x y xcent 1 280 770 -17 2 284 800 -13 3 292 840 -5 4 295 810 -2 5 298 735 1 6 304 640 7 7 308 590 11 8 315 560 18 > cent.fit1 = lm(y ~ x + I(x^2), cent.dat) > summary(cent.fit1) Call: lm(formula = y ~ x + I(x^2), data = cent.dat) Residuals: 1 2 -24.09 -1.93 3 52.91 4 5 6 7 38.97 -14.25 -48.53 -45.33 8 42.24 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -2.503e+04 1.241e+04 -2.016 0.0998 . x 1.812e+02 8.364e+01 2.167 0.0825 . I(x^2) -3.179e-01 1.407e-01 -2.259 0.0734 . --Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: 47.54 on 5 degrees of freedom Multiple R-Squared: 0.8596, Adjusted R-squared: 0.8035 F-statistic: 15.31 on 2 and 5 DF, p-value: 0.007383 > cent.fit2 = lm(y ~ xcent + I(xcent^2), cent.dat) > summary(cent.fit2) Call: lm(formula = y ~ xcent + I(xcent^2), data = cent.dat) Residuals: 1 2 -24.09 -1.93 3 52.91 4 5 6 7 38.97 -14.25 -48.53 -45.33 8 42.24 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 757.1458 24.1013 31.415 6.14e-07 *** xcent -7.5775 1.5175 -4.993 0.00413 ** I(xcent^2) -0.3179 0.1407 -2.259 0.07344 . --Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 Residual standard error: 47.54 on 5 degrees of freedom Multiple R-Squared: 0.8596, Adjusted R-squared: 0.8035 F-statistic: 15.31 on 2 and 5 DF, p-value: 0.007383 > cent.dat$x2 = > cent.dat x y xcent 1 280 770 -17 2 284 800 -13 3 292 840 -5 4 295 810 -2 5 298 735 1 6 304 640 7 7 308 590 11 8 315 560 18 cent.dat$x^2 x2 78400 80656 85264 87025 88804 92416 94864 99225 > cor(cent.dat$x,cent.dat$x2) [1] 0.9998355...
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