Consider the models [ begin{aligned} y & =beta_{0,0}+epsilon_{0} y & =beta_{0,1}+beta_{1,1} x_{1}+epsilon_{1} y & =beta_{0,2}+beta_{1,2}
Question:
Consider the models
\[ \begin{aligned} y & =\beta_{0,0}+\epsilon_{0} \\ y & =\beta_{0,1}+\beta_{1,1} x_{1}+\epsilon_{1} \\ y & =\beta_{0,2}+\beta_{1,2} x_{1}+\beta_{2,2} x_{2}+\epsilon_{2} \\ y & =\beta_{0,3}+\beta_{1,3} x_{1}+\beta_{2,3} x_{2}+\beta_{3,3} x_{3}+\epsilon_{3} \end{aligned} \]
as in equation (4.121). Generate some random data for \(y, x_{1}, x_{2}\), and \(x_{3}\),
\(\begin{aligned}
y & =\beta_{0,0}+\epsilon_0 \\
y= & \beta_{0,1}+\beta_{1,1} x_1+\epsilon_1 \\
& \vdots \\
y & =\beta_{0, p}+\beta_{1, p} x_1+\cdots+\beta_{p, p} x_p+\epsilon_p
\end{aligned}\tag{4.121}\)
\begin{aligned}
&n<-100\\
&\text { set.seed (12345) }\\
&x 1<-\operatorname{runif}(\mathrm{n})\\
&\text { x2 <- runif }(n)\\
&\text { x3 <- runif(n) }\\
&y<-4+1 * x 1+2 * x 2+3 * x 3+.05 * \operatorname{rnorm}(n)
\end{aligned}
(a) Fit the model \(y=\beta_{0,0}+\epsilon_{0}\) and compute the residuals; call them \(r_{0}\). Now fit the two models \[ \begin{aligned} r_{0} & =\theta_{0,1}+\beta_{1,1} x_{1}+\epsilon_{1 p} \\ y & =\beta_{0,1}+\beta_{1,1} x_{1}+\epsilon_{1} \end{aligned} \]
and compare the coefficient estimates as well as the partial F statistics.
(b) Let \(r_{1}\) be the vector of residuals from the model \(y=\beta_{0,1}+\) \(\beta_{1,1} x_{1}+\epsilon_{1}\) in Exercise 4.22a.
Now fit the two models \[ \begin{aligned} r_{1} & =\theta_{0,2}+\theta_{1,2} x_{1}+\beta_{2,2} x_{2}+\epsilon_{2 p} \\ y & =\beta_{0,2}+\beta_{1,2} x_{1}+\beta_{2,2} x_{2}+\epsilon_{2} \end{aligned} \]
and compare the coefficient estimates as well as the partial F statistics.
(c) Let \(r_{2}\) be the vector of residuals from the model \(y=\beta_{0,2}+\) \(\beta_{1,2} x_{1}+\beta_{2,2} x_{2}+\epsilon_{2}\) in Exercise 4.22b.
Now fit the two models \[ \begin{aligned} r_{2} & =\theta_{0,3}+\theta_{1,3} x_{1}+\theta_{2,3} x_{2}+\beta_{3,3} x_{3}+\epsilon_{3 p} \\ y & =\beta_{0,3}+\beta_{1,3} x_{1}+\beta_{2,3} x_{2}+\beta_{3,3} x_{3}+\epsilon_{3} \end{aligned} \]
and compare the coefficient estimates as well as the partial \(\mathrm{F}\) statistics.
Step by Step Answer: