By squaring the binomial expression [(Yi Y) (SxY /s2 x)(xi x)], show that n i=1 [(Yi Y) (SxY /s 2 x)(xi x)]2 = n i=1 (Yi Y) 2 2 SxY s2 x n i=1 (xi x)(Yi Y) + S2 xY s4 x n i=1 (xi x) 2 equals (n 1)S2 Y (1 R2), where X1 = x1, X2 = x2, ... , Xn = xn. Hint: Replace SxY = n i=1(xix)(YiY)/(n1) by RsxSY .

#data analysis using hamilton data to predict y data=read.csv("hamilton.csv") #wewill check the performance of first-order model m1=lm(y~x1+x2, data) summary(m1) par(mfrow=c(1,3)) plot(data[,1], m1$res) plot(data[,2],m1$res) plot(fitted(m1),m1$res) #I did not observe an obvious pattern in the residual plots #we will present the partial residual plots on x1 partial=m1$res+coef(m1)[2]*data[,1]...