(b) Consider the following linear regression on n paired observations (yi, xi1, xi2):
yi = b0 + b1xi1 + b2xi2 + εi, with εi ~ N(0, σ^2). (4)
The observations (yi, xi1, xi2) are reported in the table below:
i: 1 2 3 4 5 6
xi1: 7 4 16 3 21 8
xi2: 33 41 7 49 5 31
yi: 42 33 75 28 91 55
We want to compare (4) against a very simple model: yi = b0 + εi. For this purpose,
i. set β1 = b0 in the equation (3). Write the linear regression (4) in terms of the matrix representation (3) by stating the form of y, X1, X2, β1 and β2.
ii. The R output below (given incomplete) summarizes the statistics of fitting the regression (4) against the observation data. Give the estimates of β1 and β2.
Call:
lm(formula = y ~ x1 + x2, data = t2.data, model = T, x = T)
Coefficients:
Estimate Std. Error
(Intercept) 33.9321 26.7483
x1 2.7848 1.2891
x2 -0.2644 0.5123
> anova(t3.out)
Analysis of Variance Table
Response: y
Df Sum Sq Mean Sq
x1 1 3004.41 3004.41
x2 1 5.51 5.51
Residuals 3 62.07 20.69
---
iii. Define hat matrix H1 = X1(X1^T X1)^-1 X1^T and SSR(β1) = y^T H1 y. Show that H1 = 1/n 11^T, where 1 is (n x 1)– vector of one, and SSR(β1) = nȳ^2.
iv. From the data set and R output, find the value of SSR(β2|β1), SSR(β1), SSE = ê^T ê and SST = y^T y.
Hint: Recall that SSR(β2|β1) + SSR(β1) + SSE = SST.