This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:dan:contrast-matrix [2022/03/20 07:29] โ cjj | notes:dan:contrast-matrix [2022/03/20 08:37] (current) โ cjj | ||
---|---|---|---|
Line 26: | Line 26: | ||
\end{align*} | \end{align*} | ||
+ | As the the error of the restricted model is given by the square of the residual, | ||
+ | $$ \mathbf{r}_{\mathrm{restr}} = \mathbf{y}-\mathbf{X}๐_{0} = \mathbf{r}_{\mathrm{full}}+\mathbf{X}\left(\widehat{๐}-๐_{0}\right), | ||
+ | we have | ||
+ | \begin{eqnarray*} | ||
+ | \mathrm{Err}_{\mathrm{restr}} & = & \mathbf{r}_{\mathrm{restr}}^{T}\mathbf{r}_{\mathrm{restr}}\\ | ||
+ | & = & \mathbf{r}_{\mathrm{full}}^{T}\mathbf{r}_{\mathrm{full}}+\left(\widehat{๐}-๐_{0}\right)^{T}\color{# | ||
+ | & = & \mathrm{Err}_{\mathrm{full}}+\color{# | ||
+ | & = & \mathrm{Err}_{\mathrm{full}}+\color{# | ||
+ | & & \times\mathbf{L}^{T}\left(\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\right)^{-1}\left(\mathbf{L}\widehat{๐}-\mathbf{c}\right)\\ | ||
+ | & = & \mathrm{Err}_{\mathrm{full}}+\left(\mathbf{L}\widehat{๐}-\mathbf{c}\right)^{T}\left(\mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T}\right)^{-1}\left(\mathbf{L}\widehat{๐}-\mathbf{c}\right) | ||
+ | \end{eqnarray*} | ||
+ | where the cross terms vanish since $ \mathbf{X}^{T}\mathbf{r}_{\mathrm{full}} = 0 $ by the condition of the full model, and we observe that $ \mathbf{X}^{T}\mathbf{X} $ and $ \mathbf{L}\left(\mathbf{X}^{T}\mathbf{X}\right)^{-1}\mathbf{L}^{T} $ are both symmetric matrices. |