46 of 51 r reading an article about the drug considered in Problem 9.5, you have
ID: 3312093 • Letter: 4
Question
46 of 51 r reading an article about the drug considered in Problem 9.5, you have reasun w oelieve that the variance of Yi increases with increasing values of Xi. (a) Compute the predicted values (Yi) for the six data points in Problem 9.5. (b) Divide the six rats into two groups of three according to their drug dose (low dose and high dose). For each group, compute the sample variance of the predicted values the two groups of rats mates of Bo and B1. How do these estimates compare to those found in Problem (c) Using Equation 9.23 and the results of (b), determine appropriate weights for (d) Using the weights you found in (c), compute the weighted least-squares est 9.5?Explanation / Answer
(a)
> x=c(2.6,3.1,4.2,6.5,8.0,9.3)
> y=c(1.2,2.3,3.5,4.5,11.6,9.5)
> a=lm(y~x)
> summary(a)
Call:
lm(formula = y ~ x)
Residuals:
1 2 3 4 5 6
-0.02683 0.37596 0.04210 -2.16507 2.84329 -1.06945
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.3987 1.8829 -1.274 0.2717
x 1.3944 0.3063 4.553 0.0104 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.875 on 4 degrees of freedom
Multiple R-squared: 0.8382, Adjusted R-squared: 0.7978
F-statistic: 20.73 on 1 and 4 DF, p-value: 0.0104
> predict.lm(a)
1 2 3 4 5 6
1.226827 1.924038 3.457902 6.665073 8.756706 10.569454
Thus, the predicted values of y are:
1.23
1.92
3.46
6.66
8.76
10.57
(b)
Based on the low and high doses, we divide the first 3 rats with doses 2.6, 3.1 and 4.2 into low dose group and the last 3 rats with doses 6.5,8.0 and 9.3 into high dose group.
> var(predict.lm(a)[1:3])
[1] 1.302756
> var(predict.lm(a)[4:6])
[1] 3.81753
The sample variance of the predicted values of y of group 1 with low doses = 1.3
The sample variance of the predicted values of y of group 2 with high doses = 3.8
Part (c) and (d) cannot be solved since equation 9.23 is not provided here.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.