HW5Sol_2_ - Solution to HW#5 HW 5 Exercises 3.16(b 4.14 4.15 4.21 4.22 4.23 4.25 3.16(b-0.2-0.1 0 0.1 0.2 SSE 0.1235 0.0651 0.0390 0.0440 0.0813 The

# HW5Sol_2_ - Solution to HW#5 HW 5 Exercises 3.16(b 4.14...

• Homework Help
• 4
• 100% (2) 2 out of 2 people found this document helpful

This preview shows page 1 - 3 out of 4 pages.

Solution to HW #5HW 5: Exercises 3.16 (b), 4.14, 4.15, 4.21, 4.22, 4.23, 4.253.16(b): -0.2 -0.1 0 0.1 0.2SSE : 0.1235 0.0651 0.0390 0.0440 0.0813The transformation: 'logeYYis suggested.4.14 (a). Use R to generate linear regression model without interception:> gpa <- read.table("/Volumes/Rachel/TA/2012 Spring W4315/CH01PR19.txt")> colnames(gpa) <- c("Y","X")> lm.gpa <- lm(Y~X-1,data=gpa)> summary(lm.gpa)Call:lm(formula = Y ~ X - 1, data = gpa)Residuals:Min 1Q Median 3Q Max -3.0276 -0.2737 0.1077 0.4754 2.1820 Coefficients:Estimate Std. Error t value Pr(>|t|) X 0.121643 0.002637 46.13 <2e-16 ***---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.7257 on 119 degrees of freedomMultiple R-squared: 0.947,Adjusted R-squared: 0.9466 F-statistic: 2128 on 1 and 119 DF, p-value: < 2.2e-16 Therefore, the coefficient for X is 0.121643. The estimated regression function is ˆY0.1216*X.(b) > confint(lm.gpa,level=0.95)2.5 % 97.5 %X 0.1164216 0.1268643The estimated confidence interval for β1is (0.1164,0.1268). We are 95% confident
that (0.1164,0.1268) covers the true value of β1.(c) > predict.lm(lm.gpa,newdata=data.frame(X=30),interval="confidence",level=0.95)fit lwr upr1 3.649287 3.492647 3.805928