Algorithm Search⌘K

Definitioncore

Variance inflation factor

Also called VIF, multicollinearity diagnostic.

1 / (1 - R_j^2), where R_j^2 is from regressing predictor j on the others. It is the factor by which collinearity inflates the variance of coefficient j.

The variance inflation factor VIFj\mathrm{VIF}_j of a predictor in a linear regression is 1/(1−Rj2)1/(1 - R_j^2), where Rj2R_j^2 is the coefficient of determination of predictor jj regressed on all the other predictors. It is the exact factor by which the variance of the least squares coefficient b^j\hat b_j is larger than it would be if predictor jj were uncorrelated with the others, for the same spread of xjx_j and the same noise. VIFj=1\mathrm{VIF}_j = 1 means no collinearity for that column, and VIFj=∞\mathrm{VIF}_j = \infty means the column is an exact linear combination of the others. The square root of VIFj\mathrm{VIF}_j is the inflation of the standard error and of the width of the confidence interval. The VIF describes the design matrix only. It says nothing about yy, and a large VIF is not by itself a reason to drop a variable.

Definition

Let y=Xb+εy = Xb + \varepsilon with XX an n×pn \times p matrix of rank pp whose first column is the intercept 1\mathbf 1 and whose other columns x1,…,xp−1x_1, \dots, x_{p-1} are the predictors. Assume the errors are uncorrelated with mean 0 and variance σ2\sigma^2, and let b^\hat b be the ordinary least squares estimate. For a predictor jj, let Sjj=∑i(xij−xˉj)2>0S_{jj} = \sum_i (x_{ij} - \bar x_j)^2 > 0, and let Rj2R_j^2 be the R2R^2 of the least squares regression of xjx_j on the intercept and the other p−2p - 2 predictors. The variance inflation factor of predictor jj is

VIFj=11−Rj2.\mathrm{VIF}_j = \frac{1}{1 - R_j^2}.

Its reciprocal 1−Rj21 - R_j^2 is called the tolerance.

Why the name is exact. Let x~j\tilde x_j be the residual of xjx_j after the regression on the other columns. By the Frisch-Waugh-Lovell argument, b^j=x~j⊤y/x~j⊤x~j\hat b_j = \tilde x_j^\top y/\tilde x_j^\top\tilde x_j, so Var⁡(b^j)=σ2/∥x~j∥2\operatorname{Var}(\hat b_j) = \sigma^2/\lVert\tilde x_j\rVert^2. Since ∥x~j∥2=Sjj(1−Rj2)\lVert\tilde x_j\rVert^2 = S_{jj}(1 - R_j^2),

Var⁡(b^j)=σ2Sjj⋅VIFj.\operatorname{Var}(\hat b_j) = \frac{\sigma^2}{S_{jj}}\cdot\mathrm{VIF}_j.

The first factor, σ2/Sjj\sigma^2/S_{jj}, is the variance in a simple regression on xjx_j alone, or in any design where xjx_j is orthogonal to the other centered columns. So VIFj\mathrm{VIF}_j is the inflation caused by the other predictors and nothing else. The same identity gives two equivalent formulas:

VIFj=Sjj [(X⊤X)−1]jj=[C−1]jj,\mathrm{VIF}_j = S_{jj}\,[(X^\top X)^{-1}]_{jj} = [C^{-1}]_{jj},

where CC is the (p−1)×(p−1)(p-1) \times (p-1) correlation matrix of the predictors. The second form is the one Marquardt (1970) used.

Facts.

  1. VIFj≥1\mathrm{VIF}_j \ge 1, with equality if and only if xj−xˉj1x_j - \bar x_j\mathbf 1 is orthogonal to every other centered predictor.
  2. With two predictors, both have VIF=1/(1−r2)\mathrm{VIF} = 1/(1 - r^2), where rr is their correlation.
  3. VIFj\mathrm{VIF}_j does not change when any predictor is shifted or rescaled, because Rj2R_j^2 does not.
  4. If the eigenvalues of CC are λ1≥⋯≥λp−1>0\lambda_1 \ge \dots \ge \lambda_{p-1} > 0, then max⁡jVIFj≤1/λp−1\max_j \mathrm{VIF}_j \le 1/\lambda_{p-1} and ∑jVIFj=∑k1/λk\sum_j \mathrm{VIF}_j = \sum_k 1/\lambda_k. A small eigenvalue of CC means a near linear dependence, and the VIFs show which columns take part in it.
  5. The VIF of the intercept is not defined in this way, because the intercept column has Sjj=0S_{jj} = 0.

Thresholds are conventions. Values above 10 (or 5) are often called a sign of serious collinearity. No threshold has a theoretical basis: the variance of b^j\hat b_j also depends on σ2\sigma^2 and SjjS_{jj}, which grows with nn. A coefficient with VIF=20\mathrm{VIF} = 20 from a large, well spread sample can be more precise than one with VIF=1\mathrm{VIF} = 1 from a small sample (O'Brien 2007).

Examples and non-examples

Two predictors. For x1=(1,2,3,4,5)x_1 = (1, 2, 3, 4, 5) and x2=(2,1,4,3,6)x_2 = (2, 1, 4, 3, 6), S11=10S_{11} = 10, S22=14.8S_{22} = 14.8 and the cross product is 10, so r2=100/148=25/37r^2 = 100/148 = 25/37 and both VIFs are 37/12=3.0837/12 = 3.08. The standard errors are 3.08=1.76\sqrt{3.08} = 1.76 times what an orthogonal design with the same spreads would give.

Near dependence. Add x3=(3,4,7,7,11)x_3 = (3, 4, 7, 7, 11), which equals x1+x2x_1 + x_2 except in the second entry. Then R12=1687/1735R_1^2 = 1687/1735, R22=1099/1147R_2^2 = 1099/1147 and R32=97/98R_3^2 = 97/98, so

VIF=(36.15, 23.90, 98.0).\mathrm{VIF} = (36.15,\ 23.90,\ 98.0).

Each value agrees with Sjj[(X⊤X)−1]jjS_{jj}[(X^\top X)^{-1}]_{jj} computed in exact rational arithmetic. All three columns take part in the dependence, and all three are inflated. The standard error of b^3\hat b_3 is 98≈9.9\sqrt{98} \approx 9.9 times the orthogonal value.

From a fitted model. In the regression F-test example, with x1=1,…,8x_1 = 1, \dots, 8 and x2=(3,1,4,1,5,9,2,6)x_2 = (3, 1, 4, 1, 5, 9, 2, 6), the squared correlation is r2=75/329r^2 = 75/329 and both VIFs are 329/254=1.30329/254 = 1.30: mild collinearity.

Non-essential collinearity. For x=(1,2,3,4,5)x = (1, 2, 3, 4, 5), the columns xx and x2x^2 have r2=3600/3740r^2 = 3600/3740 and VIF=3740/140=26.7\mathrm{VIF} = 3740/140 = 26.7. With the centered u=x−3u = x - 3, the columns uu and u2=(4,1,0,1,4)u^2 = (4, 1, 0, 1, 4) have r=0r = 0 and VIF=1\mathrm{VIF} = 1. The fitted values and the quadratic coefficient are the same in both fits; only the meaning and variance of the linear coefficient change. A large VIF caused by a choice of origin is a property of the parametrization, not of the data.

Non-example: an uncentered VIF. Some programs compute ∥xj∥2[(X⊤X)−1]jj\lVert x_j\rVert^2[(X^\top X)^{-1}]_{jj} without centering, or include the intercept. Then shifting xjx_j by a constant changes the value, and a predictor that lies far from 0 shows a large "VIF" with no collinearity among the predictors. The condition number of the scaled, uncentered XX (Belsley, Kuh and Welsch) is the diagnostic that is meant to include the intercept.

Non-example: a test. The VIF has no null distribution and no level. It also does not tell whether predictions are harmed: inside the region where the data lie, fitted values can be precise when the individual coefficients are not.

  • Coefficient of determination. Rj2R_j^2 is an ordinary R2R^2, with xjx_j as the response.
  • Condition indexes. Belsley, Kuh and Welsch scale the columns of XX to unit length, take the singular values μ1≥⋯≥μp\mu_1 \ge \dots \ge \mu_p from the singular value decomposition, and use μ1/μk\mu_1/\mu_k together with the share of each Var⁡(b^j)\operatorname{Var}(\hat b_j) that comes from each singular value. Where the VIF says which coefficient is hurt, the variance decomposition proportions say which dependence hurts it.
  • Generalized VIF. For a set of columns that belong together, such as the indicator columns of one factor, Fox and Monette (1992) define GVIF=det⁡C11det⁡C22/det⁡C\mathrm{GVIF} = \det C_{11}\det C_{22}/\det C, where C11C_{11} is the correlation block of the set and C22C_{22} that of the rest. It is invariant to the coding of the set, and GVIF1/(2d)\mathrm{GVIF}^{1/(2d)} for a set of dd columns is comparable to VIF\sqrt{\mathrm{VIF}}.
  • Remedies. Ridge regression adds λI\lambda I to the correlation matrix and so lowers the variance of every coefficient; the lasso selects among correlated columns; regression on leading principal components removes the small-eigenvalue directions. All three trade bias for variance. Centering, more data in the missing directions, or a combined variable remove the cause.
  • Covariance matrix of b^\hat b. σ2(X⊤X)−1\sigma^2(X^\top X)^{-1}; the VIFs are its diagonal, rescaled by Sjj/σ2S_{jj}/\sigma^2.

References

  1. Donald W. Marquardt, Generalized inverses, ridge regression, biased linear estimation, and nonlinear estimation, Technometrics 12(3), 1970, pp. 591 to 612, The discussion of the diagonal of the inverse correlation matrix as variance inflation factors (often cited as the origin of the name and of the value 10 as a warning level)
  2. Robert M. O'Brien, A caution regarding rules of thumb for variance inflation factors, Quality and Quantity 41(5), 2007, pp. 673 to 690, The whole paper (why fixed cutoffs such as 4 or 10 are not justified, and how sample size and error variance offset a large VIF)
  3. John Fox and Georges Monette, Generalized collinearity diagnostics, Journal of the American Statistical Association 87(417), 1992, pp. 178 to 183, The whole paper (the generalized VIF for a set of columns as a ratio of determinants of correlation matrices)
  4. David A. Belsley, Edwin Kuh and Roy E. Welsch, Regression Diagnostics, Wiley, 1980, Chapter 3 (detecting and assessing collinearity, condition indexes and variance decomposition proportions)
  5. George A. F. Seber and Alan J. Lee, Linear Regression Analysis, second edition, Wiley, 2003, The section on collinearity in Chapter 10 (variance inflation factors, the correlation matrix and its eigenvalues)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/1MY9SY/text.yaml