a)
Y=-26.32541+4.87357X-0.11840X2
R2 =0.8143
The quadratic regression appears to be a good fit.
b) Alternatives:
H0: 1=2=0;
H1: at least one of 1 and 2 is not zero;
Decision Rule: Reject H0 if P-value<0.01
Conclusion: P-value<0.0001, so we reject H0
which
a)
From those three plots, both serum creatinine concentration (x1) and age (x2) tend to have
negative correlation with creatinine clearance (y).
Besides, there might be some outliers in X1-Y and X2-Y.
b)
Both X1 and X2 have the a strong and negative corr
STAT 628 Homework 3
Group Member:
Zhenqin Ge
Zhaodi Wang
6.1
a)
0
= 1
2
1 X 11 X 11 X 12
1 X 21 X 21 X 22
X= 1 X 31 X 31 X 32
1 X 41 X 41 X 42
b)
0
= 1
2
1 X 11
1 X 21
X= 1 X 31
1 X 41
X 12
X 22
X 32
X 42
6.2
a)
1
= 2
3
X 11
X 21
X= X 31
X 41
X 51
X 12
X
a) The studentized deleted residuals for each of the values of Y:
t(0.95, 12)= 1.782288, which is smaller than absolute value of case 11 and case 14 is larger, So
the outlier is Y11 and Y14
b) The diagonal elements of the hat matrix are the hlist in the a
dat = read.table('C:\Users\ZHENQIN\Desktop\Q3\STAT Reg\brand.txt')
Y = dat[,1]
X1 = dat[,2]
X2 = dat[,3]
fit = lm(Y~X1+X2)
n = nrow(dat)
plot(X1, X2)
#Examine outlying Y observations
elist = fit$resi
p = 3
SSE = sum(elist^2)
X = cbind(1,X1,X2)
hlist = dia
1) 1
2) 1
3) 2
4) 3
Alternatives:
H0: 2=3=0;
H1: at least one of 2 and 3 is not zero;
Decision Rule: Reject H0 if P-value<0.025
Conclusion: P-value=0.0222<0.025, so reject H0
which means we cannot drop both X2 and X3
from the model.
SSR(X4) = 67.775
SSR(X