In statistics, multicollinearity or collinearity is a situation where the predictors in a regression model are linearly dependent. Perfect multicollinearity refers to a situation where the predictive variables have an exact linear relationship. When there is perfect collinearity, the design matrix X has less than full rank, and therefore the moment matrix X𝖳X cannot be inverted. In this situation, the parameter estimates of the regression are not well-defined, as the system of equations has infinitely many solutions. Imperfect multicollinearity refers to a situation where the predictive variables have a nearly exact linear relationship. The Gauss–Markov theorem assumes absence of perfect multicollinearity. The adverse effect of highly correlated variables is widely known and proven many times. To address the high collinearity of a dataset, variance inflation factor can be used to identify the collinearity of the predictor variables.
Perfect multicollinearity
Perfect multicollinearity refers to a situation where the predictors are linearly dependent (one can be written as an exact linear function of the others). Ordinary least squares requires inverting the matrix X𝖳X, where
X=[1X11⋯Xk1⋮⋮⋮1X1N⋯XkN] is an N×(k+1) matrix, where N is the number of observations, k is the number of explanatory variables, and N≥k+1. If there is an exact linear relationship among the independent variables, then at least one of the columns of X is a linear combination of the others, and so the rank of X (and therefore of X𝖳X) is less than k+1, and the matrix X𝖳X will not be invertible.
Resolution Perfect collinearity is typically caused by including redundant variables in a regression. For example, a dataset may include variables for income, expenses, and savings. However, because income is equal to expenses plus savings by definition, it is incorrect to include all 3 variables in a regression simultaneously. Similarly, including a dummy variable for every category (e.g., summer, autumn, winter, and spring) as well as an intercept term will result in perfect collinearity. This is known as the dummy variable trap. The other common cause of perfect collinearity is attempting to use ordinary least squares when working with very wide datasets (those with more variables than observations). These require more advanced data analysis techniques like Bayesian hierarchical modeling to produce meaningful results.
Numerical issues Sometimes, the variables Xj are nearly collinear. In this case, the matrix X𝖳X has an inverse, but it is ill-conditioned. A computer algorithm may or may not be able to compute an approximate inverse; even if it can, the resulting inverse may have large rounding errors. The standard measure of ill-conditioning in a matrix is the condition index. This determines if the inversion of the matrix is numerically unstable with finite-precision numbers, indicating the potential sensitivity of the computed inverse to small changes in the original matrix. The condition number is computed by finding the maximum singular value divided by the minimum singular value of the design matrix. In the context of collinear variables, the variance inflation factor is the condition number for a particular coefficient.
Solutions Numerical problems in estimating can be solved by applying standard techniques from linear algebra to estimate the equations more precisely:
Standardizing predictor variables. Working with polynomial terms (e.g. x1, x12), including interaction terms (i.e., x1×x2) can cause multicollinearity. This is especially true when the variable in question has a limited range. Standardizing predictor variables will eliminate this special kind of multicollinearity for polynomials of up to 3rd order. For higher-order polynomials, an orthogonal polynomial representation will generally fix any collinearity problems. However, polynomial regressions are generally unstable, making them unsuitable for nonparametric regression and inferior to newer methods based on smoothing splines, LOESS, or Gaussian process regression. Use an orthogonal representation of the data. Poorly-written statistical software will sometimes fail to converge to a correct representation when variables are strongly correlated. However, it is still possible to rewrite the regression to use only uncorrelated variables by performing a change of basis. For polynomial terms in particular, it is possible to rewrite the regression as a function of uncorrelated variables using orthogonal polynomials.
Effects on coefficient estimates In addition to causing numerical problems, imperfect collinearity makes precise estimation of variables difficult. In other words, highly correlated variables lead to poor estimates and large standard errors. As an example, say that we notice Alice wears her boots whenever it is raining and that there are only puddles when it rains. Then, we cannot tell whether she wears boots to keep the rain from landing on her feet, or to keep her feet dry if she steps in a puddle. The problem with trying to identify how much each of the two variables matters is that they are confounded with each other: our observations are explained equally well by either variable, so we do not know which one of them causes the observed correlations. There are two ways to discover this information:
… excerpt ends here. Continue reading the full article.

