11  Multicollinearity

The least squares estimator requires \(\mathbf X'\mathbf X\) to be non-singular. When there are exact linear relations among the columns of \(\mathbf X\) (for example, a regressor that is the sum of two others), \(\mathbf X'\mathbf X\) is singular and \(\boldsymbol\beta\) cannot be estimated uniquely. This is perfect multicollinearity. Far more common in practice is near multicollinearity: the regressors are so strongly interrelated that \(\mathbf X'\mathbf X\) is nearly singular. The estimates can then be computed, but they are imprecise and unstable (Montgomery, Peck, and Vining 2021; Belsley, Kuh, and Welsch 1980; Chatterjee and Hadi 2012). In agricultural research, yield component analysis is a classic setting: tiller number and productive tiller number, plant height and panicle length, or rainfall and number of rainy days move together.

11.1 Sources of multicollinearity

  • The data collection method: sampling only a limited region of the regressor space, for example farms where high N is always accompanied by high P.
  • Constraints in the population: in a crop, the number of productive tillers cannot exceed the number of tillers, and the two are strongly related biologically.
  • Model specification: polynomial terms (\(x\) and \(x^2\) when \(x\) has a small range), interaction terms.
  • Over-defined models: more regressors than the data can support (\(p\) close to \(n\)).
  • Time series in which several regressors share a common trend.

11.2 Effects of multicollinearity

Write \(\mathbf X'\mathbf X\) in correlation form (Chapter 6). The \(j\)th diagonal element of \((\mathbf W'\mathbf W)^{-1}\) is

\[C_{jj}=\frac1{1-R_j^2},\]

where \(R_j^2\) is the coefficient of determination of the regression of \(x_j\) on all the other regressors. Hence, in the original units,

\[V(\hat\beta_j)=\frac{\sigma^2}{S_{jj}}\cdot\frac1{1-R_j^2}. \tag{11.1}\]

As \(x_j\) becomes more nearly a linear combination of the other regressors, \(R_j^2\to1\) and \(V(\hat\beta_j)\to\infty\). The consequences are:

  1. Large variances and covariances of the estimates; wide confidence intervals.
  2. Unstable estimates: small changes in the data (deleting a few observations, adding a regressor) produce large changes in the coefficients.
  3. Wrong signs: coefficients may have signs contrary to theory or experience.
  4. Insignificant \(t\) values despite a significant overall \(F\) and high \(R^2\): jointly the regressors explain \(y\) well, but the data cannot separate their individual effects.
  5. The expected squared distance from \(\hat{\boldsymbol\beta}\) to \(\boldsymbol\beta\) is large: \(E\left(\|\hat{\boldsymbol\beta}-\boldsymbol\beta\|^2\right)=\sigma^2\operatorname{tr}(\mathbf X'\mathbf X)^{-1}=\sigma^2\sum_j1/\lambda_j\), which explodes when any eigenvalue \(\lambda_j\) is near zero.
Note

Multicollinearity does not bias the estimates and need not harm prediction, provided new observations follow the same pattern of interrelation among the regressors as the sample. It is a problem of interpretation and precision of individual coefficients, and of prediction outside the pattern of the data.

11.3 Detecting multicollinearity

1. Examination of the correlation matrix

Large pairwise correlations (\(|r_{ij}|>0.8\)) between regressors indicate collinearity. However, near-dependence among three or more regressors can exist even when no pairwise correlation is large, so this check is not sufficient.

2. Variance inflation factors

\[VIF_j=C_{jj}=\frac1{1-R_j^2}. \tag{11.2}\]

\(VIF_j\) is the factor by which the variance of \(\hat\beta_j\) is inflated relative to the case of orthogonal regressors. A VIF exceeding 10 (some authors use 5) indicates that the coefficient is poorly estimated. Tolerance \(=1-R_j^2=1/VIF_j\).

3. Eigensystem analysis of \(\mathbf X'\mathbf X\)

Let \(\lambda_1\ge\lambda_2\ge\cdots\ge\lambda_k\) be the eigenvalues of \(\mathbf X'\mathbf X\) in correlation form. One or more small eigenvalues indicate near-linear dependencies. The condition number and condition indices are

\[\kappa=\frac{\lambda_{\max}}{\lambda_{\min}},\qquad \kappa_j=\frac{\lambda_{\max}}{\lambda_j}. \tag{11.3}\]

\(\kappa<100\): no serious problem; \(100\le\kappa\le1000\): moderate to strong multicollinearity; \(\kappa>1000\): severe multicollinearity. (Belsley, Kuh and Welsch use the square roots, with critical values of about 10 and 30.) The number of large condition indices equals the number of near-dependencies, and the corresponding eigenvectors show which regressors are involved: if \(\lambda_j\approx0\) with eigenvector \(\mathbf t_j\), then \(\mathbf W\mathbf t_j\approx\mathbf 0\).

4. Other indicators

  • The determinant \(|\mathbf W'\mathbf W|=\prod\lambda_j\) lies between 0 (exact dependence) and 1 (orthogonal regressors).
  • A significant overall \(F\) with no significant \(t\) values.
  • Coefficients with unexpected signs or magnitudes.
  • Klein’s rule: multicollinearity is troublesome if any \(R_j^2\) exceeds the \(R^2\) of the regression of \(y\) on all regressors.
  • Variance decomposition proportions (Belsley, Kuh, and Welsch 1980): the proportion of each \(V(\hat\beta_j)\) associated with each eigenvalue; two or more coefficients with high proportions (>0.5) on the same small eigenvalue are involved in the same dependency.

Example 11.1 Rice grain yield (g/hill) was regressed on plant height (cm), tillers per hill, productive tillers per hill, panicle length (cm) and grains per panicle for 25 hills (csv/ricecomp.csv). Examine the regression for multicollinearity.

Solution

The full fit gives \(R^2=0.865\) and overall \(F=24.38\) (highly significant), but the coefficients of tillers and productive tillers are -0.061 (\(t=-0.12\)) and 0.875 (\(t=1.48\)): neither is significant and tillers even has a negative sign, although both are known to raise yield. Their standard errors are very large. The correlation between tillers and productive tillers is 0.991.

Table 11.1: Variance inflation factors and eigenvalues of the correlation matrix of regressors
Regressor VIF \(R_j^2\) Eigenvalue Condition index
height height 1.09 0.0798 2.0620 1.0
tillers tillers 62.75 0.9841 1.2314 1.7
prodtill prodtill 63.34 0.9842 0.9942 2.1
panicle panicle 1.15 0.1289 0.7044 2.9
grains grains 1.05 0.0507 0.0080 259.1

The VIFs of tillers and productive tillers are about 63 (Table 11.1), far above 10. The smallest eigenvalue is 0.0080, giving a condition number \(\kappa=2.062/0.0080=259.1\), which lies in the range 100 to 1000 and indicates one strong near-dependency. Its eigenvector, \((0.008,\ 0.705,\ -0.709,\ -0.017,\ -0.019)\), loads almost entirely on tillers and productive tillers.

Dropping tillers (which carries the same information as productive tillers) gives VIFs all below 2, \(R^2=0.865\) (almost unchanged), and a productive-tiller coefficient of 0.804 with \(t=10.79\).

11.4 Remedies for multicollinearity

  1. Collect additional data in the region of the regressor space that is poorly covered, if possible (for example, include farms with high N but low P). Often impossible in observational studies.
  2. Respecify the model: drop one of a set of collinear regressors, or combine them into a single index (for example, total nutrients, or a ratio). Use subject-matter knowledge to decide which variable carries the information.
  3. Use prior information: impose restrictions by restricted least squares (Section 7.9).
  4. Centering regressors before forming polynomial or interaction terms removes the “non-essential” collinearity between \(x\) and \(x^2\) (Chapter 13).
  5. Biased estimation: ridge regression and principal component regression trade a small bias for a large reduction in variance.

11.4.1 Ridge regression

Hoerl and Kennard (Hoerl and Kennard 1970) proposed adding a small constant \(k\ge0\) to the diagonal of \(\mathbf X'\mathbf X\) (in correlation form):

\[\hat{\boldsymbol\beta}_R(k)=(\mathbf W'\mathbf W+k\mathbf I)^{-1}\mathbf W'\mathbf y^0. \tag{11.4}\]

\(\hat{\boldsymbol\beta}_R(k)\) is biased for \(k>0\), but its variance \(\sigma^2(\mathbf W'\mathbf W+k\mathbf I)^{-1}\mathbf W'\mathbf W(\mathbf W'\mathbf W+k\mathbf I)^{-1}\) falls rapidly as \(k\) increases. There always exists a \(k>0\) for which the mean squared error of the ridge estimator is less than that of OLS. In practice \(k\) is chosen from the ridge trace (a plot of the coefficients against \(k\), choosing the smallest \(k\) at which they stabilize), by generalized cross-validation, or by the Hoerl–Kennard–Baldwin formula \(k=p\hat\sigma^2/\hat{\boldsymbol\beta}'\hat{\boldsymbol\beta}\).

11.4.2 Principal component regression

Transform the standardized regressors to their principal components \(\mathbf Z=\mathbf W\mathbf T\), where \(\mathbf T\) is the matrix of eigenvectors of \(\mathbf W'\mathbf W\). The components are orthogonal with variances \(\lambda_j\). Regress \(y\) on the components, delete those with small eigenvalues (which carry the near-dependencies), and transform the remaining coefficients back: \(\hat{\boldsymbol\beta}_{PC}=\mathbf T_r\hat{\boldsymbol\alpha}_r\). Deleting a component imposes the restriction that the corresponding linear combination of coefficients is zero.

11.5 R practical

rc  <- read.csv("csv/ricecomp.csv")
fit <- lm(yield ~ ., data = rc)
summary(fit)
#> 
#> Call:
#> lm(formula = yield ~ ., data = rc)
#> 
#> Residuals:
#>      Min       1Q   Median       3Q      Max 
#> -1.50557 -0.65444  0.03807  0.52455  1.42837 
#> 
#> Coefficients:
#>              Estimate Std. Error t value Pr(>|t|)
#> (Intercept)  6.702726   4.794134   1.398    0.178
#> height       0.022375   0.020573   1.088    0.290
#> tillers     -0.060854   0.502588  -0.121    0.905
#> prodtill     0.875427   0.593474   1.475    0.157
#> panicle     -0.105011   0.185161  -0.567    0.577
#> grains       0.008688   0.012006   0.724    0.478
#> 
#> Residual standard error: 0.8698 on 19 degrees of freedom
#> Multiple R-squared:  0.8652, Adjusted R-squared:  0.8297 
#> F-statistic: 24.38 on 5 and 19 DF,  p-value: 1.18e-07
round(cor(rc[, -1]), 3)               # correlation matrix of regressors
#>          height tillers prodtill panicle grains
#> height    1.000   0.030    0.032   0.243  0.087
#> tillers   0.030   1.000    0.991  -0.182  0.027
#> prodtill  0.032   0.991    1.000  -0.203  0.002
#> panicle   0.243  -0.182   -0.203   1.000 -0.009
#> grains    0.087   0.027    0.002  -0.009  1.000
car::vif(fit)                         # variance inflation factors
#>    height   tillers  prodtill   panicle    grains 
#>  1.086671 62.752210 63.336218  1.148024  1.053433
e <- eigen(cor(rc[, -1]))             # eigensystem of W'W
e$values
#> [1] 2.062020094 1.231438219 0.994228977 0.704354347 0.007958362
max(e$values) / min(e$values)         # condition number
#> [1] 259.1011
round(e$vectors[, 5], 3)              # direction of the near-dependency
#> [1]  0.008  0.705 -0.709 -0.017 -0.019
det(cor(rc[, -1]))                    # determinant of W'W
#> [1] 0.01415164
library(MASS)
rr <- lm.ridge(yield ~ ., data = rc, lambda = seq(0, 10, by = 0.1))
matplot(rr$lambda, t(rr$coef), type = "l", lty = 1, lwd = 2,
        xlab = "k (lambda)", ylab = "Standardized coefficient")
legend("topright", names(rc)[-1], col = 1:5, lty = 1, bty = "n")
select(rr)                            # HKB, L-W and GCV choices of k
#> modified HKB estimator is 0.5321467 
#> modified L-W estimator is 0.6152379 
#> smallest value of GCV  at 2.9
Figure 11.1: Ridge trace for the rice yield component data
# Principal component regression: drop the smallest component
W  <- scale(rc[, -1]); pc <- prcomp(W)
Z  <- pc$x[, 1:4]                     # keep 4 of 5 components
fpc <- lm(scale(rc$yield) ~ Z - 1)
bpc <- pc$rotation[, 1:4] %*% coef(fpc) # standardized coefficients
round(drop(bpc), 3)
#>   height  tillers prodtill  panicle   grains 
#>    0.102    0.453    0.452   -0.064    0.048
Historical Insights

Frisch’s confluence analysis and Hoerl’s ridge

The term multicollinearity was coined by the Norwegian economist Ragnar Frisch in 1934, in his work on “confluence analysis”, which studied how interrelations among economic variables make it impossible to identify separate effects. Frisch shared the first Nobel Prize in Economics in 1969. Arthur Hoerl, a chemical engineer at DuPont, introduced ridge analysis for response surfaces in 1962 and, with Robert Kennard, ridge regression in 1970 (Hoerl and Kennard 1970). The idea of accepting bias to reduce variance, controversial at the time, is now central to modern statistical learning (the lasso and elastic net are its descendants).

Quotes to Inspire

“It is the mark of an educated mind to rest satisfied with the degree of precision which the nature of the subject admits.”
- Aristotle

11.6 Practical exercises

11.6.1 Practical 11.1: Diagnosing collinearity from a correlation matrix

In a coconut yield study, the correlations among three regressors (number of leaves \(x_1\), number of bunches \(x_2\) and girth \(x_3\)) were \(r_{12}=0.95\), \(r_{13}=0.30\) and \(r_{23}=0.35\). Compute the VIFs, the eigenvalues of the correlation matrix and the condition number, and comment.

Solution

The VIFs are the diagonal elements of \(\mathbf R^{-1}\) (Equation 11.2): \(VIF_1=10.38\), \(VIF_2=10.77\), \(VIF_3=1.15\). The eigenvalues are \(2.1360,\ 0.8154,\ 0.0485\), so the condition number is \(\kappa=2.136/0.0485=44.0\). The VIFs of leaves and bunches exceed 10 and the smallest eigenvalue is near zero: leaves and bunches carry nearly the same information. \(\kappa\) is below 100, so by the condition number criterion the collinearity is borderline; the VIFs give the clearer warning. Using only one of \(x_1\) and \(x_2\) (or their sum) is advisable.

Doing it in R

R <- matrix(c(1.00, 0.95, 0.30,
              0.95, 1.00, 0.35,
              0.30, 0.35, 1.00), 3)
diag(solve(R))                         # VIFs
#> [1] 10.384615 10.769231  1.153846
ev <- eigen(R); ev$values
#> [1] 2.1360495 0.8154379 0.0485126
max(ev$values) / min(ev$values)        # condition number
#> [1] 44.03082
round(ev$vectors[, 3], 3)              # the near-dependency involves x1 and x2
#> [1]  0.699 -0.714  0.042
det(R)
#> [1] 0.0845

11.6.2 Practical 11.2: Ridge regression on the rice yield components

Using csv/ricecomp.csv, fit ridge regressions for \(k\) from 0 to 10, choose \(k\) by generalized cross-validation and compare the ridge and OLS coefficients of tillers and productive tillers.

Solution

Generalized cross-validation chooses \(k=2.90\). The ridge coefficients of tillers and productive tillers are 0.297 and 0.409: both are now positive, and the effect that OLS loaded almost entirely on productive tillers (with a negative coefficient for tillers, -0.061) is shared between the two collinear variables, as their near-identical information requires.

Doing it in R

rc <- read.csv("csv/ricecomp.csv")
rr <- MASS::lm.ridge(yield ~ ., data = rc, lambda = seq(0, 10, by = 0.05))
kbest <- rr$lambda[which.min(rr$GCV)]; kbest
#> [1] 2.9
rbind(OLS   = coef(lm(yield ~ ., data = rc))[c("tillers", "prodtill")],
      ridge = coef(MASS::lm.ridge(yield ~ ., data = rc, lambda = kbest))[c("tillers", "prodtill")])
#>           tillers  prodtill
#> OLS   -0.06085418 0.8754265
#> ridge  0.29677546 0.4091425

11.7 Chapter Summary

Fill in the blanks

Answers are given at the end of the chapter.

  1. An exact linear relation among the columns of \(\mathbf X\) makes \(\mathbf X'\mathbf X\) __________.

  2. \(VIF_j=\) __________, where \(R_j^2\) is from regressing \(x_j\) on the other regressors.

  3. A VIF greater than __________ is usually taken to indicate serious multicollinearity.

  4. The reciprocal of VIF is called __________.

  5. The condition number is \(\kappa=\) __________.

  6. A condition number above __________ indicates severe multicollinearity.

  7. Multicollinearity does not cause __________ in the OLS estimates.

  8. The ridge estimator is \(\hat{\boldsymbol\beta}_R=\) __________.

  9. The plot of ridge coefficients against \(k\) is called the __________.

  10. In principal component regression, components with small __________ are deleted.

Short-answer questions

  1. Distinguish between perfect and near multicollinearity.

  2. List the sources of multicollinearity in agricultural data.

  3. Derive the relation between \(V(\hat\beta_j)\) and \(R_j^2\).

  4. Explain the effects of multicollinearity on regression results.

  5. Why is examination of pairwise correlations not sufficient to detect multicollinearity?

  6. Explain VIF, eigenvalues and the condition number as diagnostics.

  7. State Klein’s rule.

  8. Describe the remedies for multicollinearity.

  9. Explain ridge regression. Why is a biased estimator acceptable?

  10. Explain principal component regression.

Numerical and conceptual questions

Answers are given at the end of the chapter.

  1. Regressing \(x_2\) on the other regressors gives \(R_2^2=0.92\). Find \(VIF_2\) and the tolerance.

  2. For two regressors with correlation \(r_{12}=0.95\), find the VIF of each.

  3. The eigenvalues of \(\mathbf W'\mathbf W\) are 2.8, 1.1, 0.098 and 0.002. Find the condition number and condition indices and interpret.

  4. For Question 3, find \(|\mathbf W'\mathbf W|\).

  5. A model has \(R^2=0.85\); the auxiliary \(R^2\) values are 0.62, 0.90 and 0.45. Apply Klein’s rule.

  6. If \(V(\hat\beta_j)=0.04\) with orthogonal regressors, what is it when \(VIF_j=25\)?

  7. A regression has overall \(F\) significant at 1% but no \(t\) value significant at 5%. What is the likely cause?

  8. Why does centering reduce the correlation between \(x\) and \(x^2\)?

Important formulae

Variance of a coefficient:

\[ V(\hat\beta_j)=\frac{\sigma^2}{S_{jj}(1-R_j^2)} \]

Variance inflation factor:

\[ VIF_j=\frac1{1-R_j^2} \]

Condition number and indices:

\[ \kappa=\frac{\lambda_{\max}}{\lambda_{\min}},\qquad\kappa_j=\frac{\lambda_{\max}}{\lambda_j} \]

Ridge estimator:

\[ \hat{\boldsymbol\beta}_R(k)=(\mathbf W'\mathbf W+k\mathbf I)^{-1}\mathbf W'\mathbf y^0 \]

Quick revision

  • Multicollinearity → near-dependence among regressors → \(\mathbf X'\mathbf X\) nearly singular.
  • Effects → large SEs, unstable and wrong-signed coefficients, high \(R^2\) with insignificant \(t\).
  • Detect → correlations, VIF > 10, small eigenvalues, \(\kappa>1000\).
  • Remedy → more data, respecify, restrictions, centering, ridge, principal components.
  • No bias; prediction within the data pattern is unaffected.

Answers to fill in the blanks

1. Singular 2. \(1/(1-R_j^2)\) 3. 10 4. Tolerance 5. \(\lambda_{\max}/\lambda_{\min}\) 6. 1000 7. Bias 8. \((\mathbf W'\mathbf W+k\mathbf I)^{-1}\mathbf W'\mathbf y^0\) 9. Ridge trace 10. Eigenvalues

Solutions to numerical and conceptual questions

  1. \(VIF_2=1/0.08=12.5\); tolerance \(=0.08\) (Equation 11.2).

  2. \(VIF=1/(1-0.9025)=10.26\) for both.

  3. \(\kappa=2.8/0.002=1400>1000\): severe; condition indices 1, 2.55, 28.6, 1400; one severe dependency (and possibly a weak one).

  4. \(|\mathbf W'\mathbf W|=2.8\times1.1\times0.098\times0.002=0.000604\), close to 0.

  5. \(0.90>0.85\), so by Klein’s rule multicollinearity involving the second regressor is troublesome.

  6. \(0.04\times25=1.0\) (standard error 5 times larger).

  7. Multicollinearity: jointly the regressors explain \(y\), but their separate effects cannot be distinguished.

  8. When \(x\) takes only positive values over a narrow range, \(x\) and \(x^2\) increase together almost linearly; after centering, \((x-\bar x)\) and \((x-\bar x)^2\) are nearly uncorrelated for a symmetric design.