Tutorials › Statistical Theory III - Theories of Inference, Multivariate Methods, and Contingency Tables › A Rank-Deficient Design With an Added Restriction

Linear Restrictions and Reparameterization · Tutorial 196 of 972

A Rank-Deficient Design With an Added Restriction

Work through a rank-deficient least-squares fit, then see precisely how an added restriction selects coefficients without necessarily changing the fitted values.

Intermediate 11 min read

What You'll Learn

  • Compute least-squares fitted values when the design matrix is rank deficient
  • Describe all coefficient vectors that produce the same least-squares fit
  • Use a compatible linear restriction to select unique coefficients
  • Distinguish a contrast identified by a restriction from one identified by the data
  • Check when a restriction preserves the unrestricted fitted vector

Why a Restriction Matters in a Rank-Deficient Model

When a design matrix is rank deficient, different coefficient vectors can produce exactly the same fitted values. Least squares can still determine a unique fitted vector, even though it cannot determine a unique coefficient vector. A linear restriction can select one coefficient vector from the alternatives, but that selection must be distinguished from information supplied by the observations themselves.

The distinction is useful whenever coefficients are reported individually. An added restriction may let us calculate a coefficient or contrast, but that answer depends on the restriction. We will see this in a numerical model, verify the calculations directly, and state conditions under which the fit stays unchanged and the coefficients become unique.

Definition: In the linear model \(y=X\beta+\varepsilon\), a least-squares coefficient vector minimizes \(\|y-X\beta\|^2\). The corresponding fitted vector is \(X\hat{\beta}\). If \(X\) is rank deficient, there is a nonzero vector \(v\) with \(Xv=0\), so \(\beta\) and \(\beta+v\) have the same fitted vector. A linear restriction has the form \(A\beta=r\).

A Numerical Rank-Deficient Design

Consider four responses and the design matrix

$$ y= \begin{pmatrix} 2\\3\\1\\0 \end{pmatrix}, \qquad X= \begin{pmatrix} 1&0&1\\ 1&0&1\\ 0&1&1\\ 0&1&1 \end{pmatrix}. $$

For \(\beta=(\beta_1,\beta_2,\beta_3)^{\mathsf T}\), the fitted vector is

$$ X\beta= \begin{pmatrix} \beta_1+\beta_3\\ \beta_1+\beta_3\\ \beta_2+\beta_3\\ \beta_2+\beta_3 \end{pmatrix}. $$

The first and third columns sum to the second and third rows' pattern in a way that makes the three columns linearly dependent: the nonzero vector \((-1,-1,1)^{\mathsf T}\) is in the null space because

$$ X \begin{pmatrix} -1\\-1\\1 \end{pmatrix} = \begin{pmatrix} 0\\0\\0\\0 \end{pmatrix}. $$

The matrix has rank two: its first and third columns are linearly independent, while the second column is the third column minus the first. Thus its null space is one-dimensional. Write \(\gamma_1=\beta_1+\beta_3\) and \(\gamma_2=\beta_2+\beta_3\). The sum of squared residuals is

$$ S(\gamma_1,\gamma_2) =(2-\gamma_1)^2+(3-\gamma_1)^2 +(1-\gamma_2)^2+(0-\gamma_2)^2. $$

Worked Example: Finding the Unrestricted Least-Squares Fit

The two fitted coordinates can be chosen independently. For the first coordinate,

$$ (2-\gamma_1)^2+(3-\gamma_1)^2 =2\left(\gamma_1-\frac{5}{2}\right)^2+\frac{1}{2}. $$

This is minimized at \(\hat{\gamma}_1=5/2\), with contribution \(1/2\) to the residual sum of squares. For the second coordinate,

$$ (1-\gamma_2)^2+(0-\gamma_2)^2 =2\left(\gamma_2-\frac{1}{2}\right)^2+\frac{1}{2}. $$

This is minimized at \(\hat{\gamma}_2=1/2\), also with contribution \(1/2\). Therefore the minimum residual sum of squares is \(1\), and the fitted vector is

$$ \hat{y}= \begin{pmatrix} 5/2\\5/2\\1/2\\1/2 \end{pmatrix}. $$

Direct checking gives residuals \((-1/2,1/2,1/2,-1/2)^{\mathsf T}\), whose squared entries sum to \(1/4+1/4+1/4+1/4=1\). The coefficients must satisfy \(\beta_1+\beta_3=5/2\) and \(\beta_2+\beta_3=1/2\). Hence every least-squares coefficient vector has the form

$$ \hat{\beta}(t)= \begin{pmatrix} 5/2-t\\ 1/2-t\\ t \end{pmatrix}, \qquad t\in\mathbb{R}. $$

For example, \(t=0\) gives \((5/2,1/2,0)^{\mathsf T}\), while \(t=1\) gives \((3/2,-1/2,1)^{\mathsf T}\). Both yield the same fitted vector. In fact, changing \(t\) adds a multiple of the null vector \((-1,-1,1)^{\mathsf T}\).

What the Least-Squares Fit Determines

The fit in the example is determined by the data, while its coefficient representation is not. This is not an accident specific to this matrix.

Theorem: For any real matrix \(X\) and response vector \(y\), the least-squares fitted vector is unique, even if the least-squares coefficient vector is not.

Proof. Suppose \(b_1\) and \(b_2\) are both least-squares coefficient vectors, and write \(z_1=Xb_1\) and \(z_2=Xb_2\). Their midpoint \(b_m=(b_1+b_2)/2\) is also an available coefficient vector, and its fitted vector is \((z_1+z_2)/2\). The identity

$$ \left\|y-\frac{z_1+z_2}{2}\right\|^2 =\frac{\|y-z_1\|^2+\|y-z_2\|^2}{2} -\frac{\|z_1-z_2\|^2}{4} $$

follows by expanding the squared norms. Since \(b_1\) and \(b_2\) are minimizers, the midpoint cannot have a smaller residual sum of squares. The first term on the right before the subtraction is the minimum value. If \(z_1\ne z_2\), the subtracted term is strictly positive, contradicting minimality. Thus \(z_1=z_2\), so the fitted vector is unique. \(\square\)

In the example, \(\beta_1\) alone is not determined by the observations: moving along the null direction changes it. By contrast, \(\beta_1+\beta_3\) is determined, because it is unchanged by that move. More generally, a contrast \(c^{\mathsf T}\beta\) is estimable from the design when it has the same value for every coefficient vector with a given fitted vector; equivalently, \(c^{\mathsf T}v=0\) for every \(v\) satisfying \(Xv=0\).

Using a Restriction to Select Coefficients

Suppose an added restriction is compatible with at least one unrestricted least-squares coefficient vector. It can then select a representation of the already determined fitted vector. For the example, take the restriction \(\beta_1+\beta_2+\beta_3=0\).

Worked Example: A Restriction That Identifies a Previously Unidentified Coefficient

Substitute the least-squares family \(\hat{\beta}(t)\) into the restriction:

$$ (5/2-t)+(1/2-t)+t=3-t=0. $$

Thus \(t=3\), and the restricted coefficients are

$$ \hat{\beta}_{R}= \begin{pmatrix} -1/2\\-5/2\\3 \end{pmatrix}. $$

The restriction identifies \(\beta_1=-1/2\) within this restricted model, even though \(\beta_1\) was not determined by the unrestricted data. The fitted vector remains unchanged:

$$ X\hat{\beta}_{R} = \begin{pmatrix} -1/2+3\\ -1/2+3\\ -5/2+3\\ -5/2+3 \end{pmatrix} = \begin{pmatrix} 5/2\\5/2\\1/2\\1/2 \end{pmatrix}. $$

The value \(-1/2\) is therefore not a newly discovered feature of the observations alone. It is the value selected by combining the observations with the stated restriction.

The following condition formalizes when a restriction selects a unique coefficient vector without changing the unrestricted fit. Here, \(A\) is a fixed matrix and \(r\) a fixed vector.

Result: Suppose the restriction set \(\{\beta:A\beta=r\}\) intersects the set of unrestricted least-squares coefficient vectors. If \(\ker(X)\cap\ker(A)=\{0\}\), then there is exactly one unrestricted least-squares coefficient vector satisfying the restriction. Its fitted vector is the unrestricted least-squares fitted vector.

Proof. Let \(b_0\) be an unrestricted least-squares coefficient vector satisfying \(Ab_0=r\). Any other unrestricted least-squares coefficient vector \(b\) has the same fitted vector as \(b_0\), by the theorem just proved. Therefore \(X(b-b_0)=0\). If \(b\) also satisfies the restriction, then \(A(b-b_0)=0\). The difference belongs to \(\ker(X)\cap\ker(A)\), which by assumption contains only the zero vector. Hence \(b=b_0\), proving uniqueness. Since \(b_0\) is unrestricted least squares, its fitted vector is the unrestricted fitted vector. \(\square\)

For a single restriction \(a^{\mathsf T}\beta=r\) in this example, the condition is that \(a^{\mathsf T}(-1,-1,1)^{\mathsf T}\ne 0\). The restriction \(\beta_1+\beta_2+\beta_3=0\) meets this condition: its coefficient vector is \((1,1,1)^{\mathsf T}\), whose inner product with the null vector is \(-1\). It therefore selects one coefficient vector from the least-squares family, provided the restriction is imposed at a value that the family can satisfy.

Worked Example: A Different Restriction, the Same Fit

Instead impose \(\beta_3=0\). In the least-squares family, this sets \(t=0\), giving \(\hat{\beta}_{R}=(5/2,1/2,0)^{\mathsf T}\). Its fitted vector is

$$ X\hat{\beta}_{R} = \begin{pmatrix} 5/2\\5/2\\1/2\\1/2 \end{pmatrix}, \qquad \|y-X\hat{\beta}_{R}\|^2 =\frac14+\frac14+\frac14+\frac14=1. $$

This restriction and the sum-to-zero restriction select different coefficient vectors, but both select vectors from the same unrestricted least-squares family. Each preserves the unique fitted vector. The data determine the fitted coordinates \(5/2\) and \(1/2\); the restriction determines which coefficient representation is reported.

Worked Example: A Restriction That Does Not Restore Coefficient Uniqueness

Now impose the restriction \(\beta_1-\beta_2=2\). For every vector in the least-squares family,

$$ \beta_1-\beta_2=(5/2-t)-(1/2-t)=2. $$

So the restriction is already satisfied by every unrestricted least-squares coefficient vector. It does not select one value of \(t\): for instance, both \((5/2,1/2,0)^{\mathsf T}\) and \((3/2,-1/2,1)^{\mathsf T}\) satisfy it and yield the same fit. This contrast is identifiable from the design, but the restriction does not make all three coefficients unique. Its row vector \((1,-1,0)\) is orthogonal to the null vector, so it does not cut across the direction of coefficient nonuniqueness.

Common Pitfall: Confusing a Selected Representation With a New Fit

A common mistake is to see different restricted coefficient vectors and conclude that they must give different fitted values, or to report a coefficient chosen by a restriction as though it were determined by the observations alone. In a rank-deficient model, coefficients can change in a null direction while the fitted vector stays fixed. Conversely, a restriction need not select a unique coefficient vector: if it holds along the entire null direction, coefficient nonuniqueness remains.

For the numerical design, the unrestricted residual sum of squares contains one term for each observed response:

$$ (2-\gamma_1)^2+(3-\gamma_1)^2 +(1-\gamma_2)^2+(0-\gamma_2)^2. $$

Each response occurs once in the data. The repeated fitted coordinates do not duplicate observations or residual terms. At \((\gamma_1,\gamma_2)=(5/2,1/2)\), these four squared residuals sum to \(1\), as direct calculation confirms.

Key takeaway: In a rank-deficient design, least squares uniquely determines the fitted vector but may not uniquely determine coefficients. A compatible restriction selects unique coefficients only when it rules out every nonzero direction shared by the null spaces of \(X\) and \(A\). The selected coefficient values depend on that restriction.

Check Your Understanding

Use the design and response in this tutorial to answer the questions.

  1. Verify directly that \((-1,-1,1)^{\mathsf T}\) is in the null space of \(X\), and explain why this implies nonunique unrestricted coefficients.
  2. What are the unrestricted least-squares fitted coordinates and residual sum of squares? Show the four individual squared residual contributions.
  3. Under the restriction \(\beta_3=1\), find the coefficient vector that gives the unrestricted least-squares fit.
  4. Explain why \(\beta_1\) is not determined by the unrestricted design, while \(\beta_1+\beta_3\) is.
  5. For a single restriction \(a^{\mathsf T}\beta=r\), what condition on \(a\) makes it cut across the null direction in this example?
Clinical Biostats