Work through each problem by hand, then use the R code to check your answers.
Problem 1
A multiple linear regression model is fit with \(n = 35\), \(\text{SSE} = 180\), \(\hat{\boldsymbol{\beta}} = (2.0,\; -1.0,\; 4.0)^T\), and \((\mathbf{X}^T\mathbf{X})^{-1} = \begin{bmatrix}0.3 & 0 & 0\\0 & 0.5 & 0\\0 & 0 & 0.2\end{bmatrix}\). Compute the standard errors for all three coefficients. Compute the \(t\)-statistic for each slope and determine which (if any) you reject at \(\alpha = 0.05\). Construct 95% confidence intervals for \(\beta_1\) and \(\beta_2\). For a new observation \(\mathbf{x}_\text{new} = (1, 2, 1)^T\), compute the point prediction, a 95% CI for \(E[y_\text{new}]\), and a 95% PI for \(y_\text{new}\).
A cubic spline with interior knots at \(\xi_1 = 2\) and \(\xi_2 = 6\) is fit to observations \(x = (1, 4, 6, 9, 11)\) with estimated coefficients \(\hat{\boldsymbol{\beta}} = (0.5,\; 1.2,\; -0.1,\; 0.01,\; -0.02,\; 0.005)^T\). Construct the full design matrix. Compute \(\hat{y}\) for each observation. Compute the expected change in \(\hat{y}\) going from \(x = 4\) to \(x = 9\).