Partial F-test for nested linear models (source code)

= Partial F-test for nested linear models
{title2=$F=\frac{(\operatorname{RSS}_0-\operatorname{RSS}_1)/(p_1-p_0)}{\operatorname{RSS}_1/(n-p_1)}$}

= Partial F-test
{synonym}

Let $M_0\subset M_1$ be nested <normal linear models> with full-rank <design matrix>[design matrices] of ranks $p_0,p_1$, where $0\leq p_0<p_1<n$, and $n$ observations. Under the reduced model,
$$
F=\frac{(\operatorname{RSS}_0-\operatorname{RSS}_1)/(p_1-p_0)}{\operatorname{RSS}_1/(n-p_1)}\sim F_{p_1-p_0,n-p_1}.
$$
The difference of the <orthogonal projection>[orthogonal projection matrices] onto the two model spaces is an <orthogonal projection> of rank $p_1-p_0$, orthogonal to the full-model <regression residual>[residual] projection. <independent random variables>[Independent] <normal distribution> projections therefore give <independent random variables>[independent] <chi-squared distribution>[chi-squared numerators] and denominators after division by $\sigma^2$. This proves the ratio law. The test evaluates the extra terms conditional on all reduced-model terms, and estimates the unknown common <variance> from the full model.