Data for two variables, x and y, follow.
xi | 22 | 24 | 25 | 28 | 41 |
yi | 12 | 23 | 31 | 36 | 69 |
a. Develop the estimated regression equation for these data (to 2 decimals). Enter negative value as negative number.
y=-43.71+2.78x
b. Compute the standardized residuals for these data (to 2 decimals). Enter negative value as negative number.
xi | yi | Standardized Residual |
22 | 12 | |
24 | 23 | -0.02 |
25 | 31 | 1.31 |
28 | 36 | |
41 | 69 |
c. Compute the leverage values for these data (to 2 decimals).
xi | yi | hi |
22 | 12 | |
24 | 23 | |
25 | 31 | |
28 | 36 | |
41 | 69 |
With only five points it is difficult to determine if the model assumptions are violated.
d. Compute Cook’s distance measure for these data (to 2 decimals).
xi | yi | di |
22 | 12 | |
24 | 23 | |
25 | 31 | |
28 | 36 | |
41 | 69 |
How many observations influential?
We conclude that the ____ th observation is influential.
a.
b. -1.51, -0.02, 1.30, 0.44, -1.18
c. 0.36, 0.27, 0.24, 0.20, 0.93
d. 26.71, 0.00, 10.97 , 1.00, 366.70
3 observations are influencial (since if D>1 we consider this observation is influential)
First, 3rd and 5th observations are influential.
R code:
x=c(22,24,25,28,41)
y=c(12,23,31,36,69)
Model=lm(y~x)
Model #a
round(rstandard(Model),2)#b
X=cbind(rep(1,5),x)
H=X%*%solve(t(X)%*%X)%*%t(X)
h=round(diag(H),2)
h#c
e=y-(-43.713+2.783*x)
r=1:5*0
D=r
for(i in 1:5)
{
r[i]=e[i]/sqrt(1-h[i])
D[i]=(r[i])^2*(h[i]/(1-h[i]))
}
round(D,2) #d
Get Answers For Free
Most questions answered within 1 hours.