420Hw11ans - STAT 420(10 points(due Friday November 14 by...

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

View Full Document Right Arrow Icon
STAT 420 Fall 2008 Homework #11 (10 points) (due Friday, November 14, by 3:00 p.m.) 1. A forester seeking information on basic tree dimensions obtains the following measurements of the diameters 4.5 feet above the ground and the heights of 12 sugar maple trees. The forester wishes to determine if the diameter measurements can be used to predict the tree height. Diameter x (inches) 0.9 1.2 2.9 3.1 3.3 3.9 4.3 6.2 9.6 12.6 16.1 25.8 Height y (feet) 18 26 32 36 44.5 35.6 40.5 57.5 67.3 84 67 87.5 a) Make a scatterplot of x vs. y . Does a straight-line relationship seem appropriate? > x = c(0.9,1.2,2.9,3.1,3.3,3.9,4.3,6.2,9.6,12.6,16.1,25.8) > y = c(18,26,32,36,44.5,35.6,40.5,57.5,67.3,84,67,87.5) > plot(x,y) A straight-line relationship does NOT seem appropriate.
Background image of page 1

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

View Full DocumentRight Arrow Icon
b) Make a scatterplot of x ' = ln x vs. y ' = ln y . Does a straight-line relationship seem appropriate? > plot(x,y) * the least-squares regression line has been added to the scatterplot A straight-line relationship does seem appropriate. c) Fit a straight-line regression to the transformed data. Add the least-squares regression line to the scatterplot from part(b). Comment on the adequacy of the fit. > fit1 = lm(log(y) ~ log(x)) > abline(fit1$coefficients) > summary(fit1) Call: lm(formula = log(y) ~ log(x)) Residuals: Min 1Q Median 3Q Max -0.15611 -0.11362 -0.02904 0.11127 0.18389
Background image of page 2
Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3.06980 0.07467 41.11 1.74e-12 *** log(x) 0.46459 0.04039 11.50 4.35e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.1348 on 10 degrees of freedom Multiple R-Squared: 0.9297, Adjusted R-squared: 0.9227 F-statistic: 132.3 on 1 and 10 DF, p-value: 4.347e-07 The least-squares regression line fits the data well. R 2 = 0.9297. d) Construct a 95% prediction interval for the height of the tree y with the diameter x = 10 inches. Hint: Construct a 95% prediction interval for ln y first. > predict.lm(fit1, data.frame(x=10), interval=c("prediction"), level=0.95) fit lwr upr [1,] 4.139553 3.820263 4.458843 OR > x2 = log(x) > y2 = log(y) > fit2 = lm(y2 ~ x2) > predict.lm(fit2, data.frame(x2=log(10)), interval=c("prediction"), level=0.95) fit lwr upr [1,] 4.139553 3.820263 4.458843 A 95% prediction interval for ln y is ( 3.820263 , 4.458843 ) e 3.820263 = 45.6162 e 4.458843 = 86.3875 A 95% prediction interval for ln y is ( 45.6162 , 86.3875 ) > exp(3.820263) [1] 45.6162 > exp(4.458843) [1] 86.3875
Background image of page 3

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

View Full DocumentRight Arrow Icon
2. 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. > library(faraway)
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 21

420Hw11ans - STAT 420(10 points(due Friday November 14 by...

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

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