{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

SAS_HW3_SOLUTION

# SAS_HW3_SOLUTION -             Homework 3...

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:            !!  Homework 3 Solutions, Stat 4315, Summer 2008 Problems: 3.19, 3.20, 3.24, 3.28, 4.10, 4.21, 4.25 Note: This week I graded problems 3.20, 4.10, 3.24 and 3.28. Please be sure to check your solutions to the additional problems! Problem 3.19 The plot against the fitted values is preferable. If there isn't a relationship between e_i and the fitted values it implies there isn't a relationship between the residuals and the x's. Problem 3.20 Changing X shouldn't change the residual since all we did was change the functional form of the relationship between the expected y and the x, but changing Y should (think about a log transformation, for example!). Problem 3.24 Problem 3.28 See the SAS codes below Problem 4.10 Problem 4.21 Yes, no Problem 4.25 Appendix-Problem 3.28 SAS Codes. Note that the code you need to do problem 3.24 will be similar. data hospitalstay; input id y x1 x2 x3 infection x5 x6 geo x8 x9 x10 ; cards; 1 7.13 55.7 4.1 9.0 39.6 279 2 4 207 241 60.0 2 8.82 58.2 1.6 3.8 51.7 80 2 2 51 52 40.0 --------Remaining data values--------------------------112 17.94 56.2 5.9 26.4 91.8 835 1 1 791 407 62.9 113 9.41 59.5 3.1 20.6 91.7 29 2 3 20 22 22.9 ; run; PROC SORT DATA=hospitalstay OUT=hosp_sort ; BY geo ; RUN ; proc print data=hosp_sort; run; proc univariate data=hosp_sort; by geo; run; proc reg data = hosp_sort; model y = infection/ clb cli clm alpha=.01; by geo; plot residual.*infection; output out=hosp_resid residual=resid; run; proc univariate data=hosp_resid; qqplot; by geo; run; 4.27. a. B = t(.975; 111) = 1.982, b0 = 6.3368, s{b0} = .5213, b1 = .7604, s{b1} = .1144 6.3368 ± 1.982(.5213) 5.304 ≤ β0 ≤ 7.370 0.7604 ± 1.982(.1144) 0.534 ≤ β1 ≤ 0.987 b. No c. F(.95; 2, 111) = 3.08, W = 2.482; B = t(.99375; 111) = 2.539; Working-Hotelling d. Xh = 2: 7.858 ± 2.482(.3098) 7.089 ≤ E{Yh} ≤ 8.627 Xh = 3: 8.618 ± 2.482(.2177) 8.078 ≤ E{Yh} ≤ 9.158 Xh = 4: 9.378 ± 2.482(.1581) 8.986 ≤ E{Yh} ≤ 9.770 Xh = 5: 10.139 ± 2.482(.1697) 9.718 ≤ E{Yh} ≤ 10.560 ...
View Full Document

{[ snackBarMessage ]}