420Hw08ans - STAT 420 (10 points) (due Friday, March 28, by...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
STAT 420 Spring 2008 Homework #8 (10 points) (due Friday, March 28, by 4:00 p.m.) 1. For the prostate data, fit a model with lpsa as the response and the other variables as predictors. a) Implement the Backward Elimination variable selection method to determine the “best” model. Use α crit = 0.05. ( 8.1 (a) ) > library(faraway) > data(prostate) > attach(prostate) > fit = lm(lpsa~lcavol+lweight+age+lbph+svi+lcp+gleason+pgg45) > summary(fit) Call: lm(formula = lpsa ~ lcavol + lweight + age + lbph + svi + lcp + gleason + pgg45) Residuals: Min 1Q Median 3Q Max -1.7331 -0.3713 -0.0170 0.4141 1.6381 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.669337 1.296387 0.516 0.60693 lcavol 0.587022 0.087920 6.677 2.11e-09 *** lweight 0.454467 0.170012 2.673 0.00896 ** age -0.019637 0.011173 -1.758 0.08229 . lbph 0.107054 0.058449 1.832 0.07040 . svi 0.766157 0.244309 3.136 0.00233 ** lcp -0.105474 0.091013 -1.159 0.24964 gleason 0.045142 0.157465 0.287 0.77503 pgg45 0.004525 0.004421 1.024 0.30886 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.7084 on 88 degrees of freedom Multiple R-squared: 0.6548, Adjusted R-squared: 0.6234 F-statistic: 20.86 on 8 and 88 DF, p-value: < 2.2e-16 gleason is the least significant variable, p-value = 0.77503. > fit1 = update(fit, .~. - gleason)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
> summary(fit1) Call: lm(formula = lpsa ~ lcavol + lweight + age + lbph + svi + lcp + pgg45) Residuals: Min 1Q Median 3Q Max -1.73117 -0.38137 -0.01728 0.43364 1.63513 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.953926 0.829439 1.150 0.25319 lcavol 0.591615 0.086001 6.879 8.07e-10 *** lweight 0.448292 0.167771 2.672 0.00897 ** age -0.019336 0.011066 -1.747 0.08402 . lbph 0.107671 0.058108 1.853 0.06720 . svi 0.757734 0.241282 3.140 0.00229 ** lcp -0.104482 0.090478 -1.155 0.25127 pgg45 0.005318 0.003433 1.549 0.12488 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.7048 on 89 degrees of freedom Multiple R-squared: 0.6544, Adjusted R-squared: 0.6273 F-statistic: 24.08 on 7 and 89 DF, p-value: < 2.2e-16 lcp is the least significant variable, p-value = 0.25127. > fit1 = update(fit1, .~. - lcp) > summary(fit1) Call: lm(formula = lpsa ~ lcavol + lweight + age + lbph + svi + pgg45) Residuals: Min 1Q Median 3Q Max -1.777e+00 -4.171e-01 1.733e-05 4.068e-01 1.597e+00 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.980085 0.830665 1.180 0.24116 lcavol 0.545770 0.076431 7.141 2.31e-10 *** lweight 0.449450 0.168078 2.674 0.00890 ** age -0.017470 0.010967 -1.593 0.11469
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/10/2009 for the course STAT 420 taught by Professor Stepanov during the Spring '08 term at University of Illinois at Urbana–Champaign.

Page1 / 20

420Hw08ans - STAT 420 (10 points) (due Friday, March 28, by...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online