Beta stability in linear regression with high multi-collinearity?

Let's say in a linear regression, the variables $x_1$ and $x_2$ has high multi-collinearity (correlation is around 0.9).

We are concerned about the $\beta$ coefficient stability so we have to treat the multi-collinearity.

The textbook solution would be to just throw away one of variables.

But we don't want to lose useful information by simply throwing away variables.

Any suggestions?

  • 5
    $\begingroup$ Have you tried some kind of regularization scheme (e.g. ridge regression)? $\endgroup$
    – Néstor
    Commented Jul 17, 2012 at 15:38

3 Answers 3


Well, there is one ad hoc method that I've used before. I'm not sure if this procedure has a name but it makes sense intuitively.

Suppose your goal is to fit the model

$$ Y_i = \beta_0 + \beta_1 X_i + \beta_2 Z_i + \varepsilon_i $$

where the two predictors - $X_i, Z_i$ - are highly correlated. As you've pointed out, using them both in the same model can do strange things to the coefficient estimates and $p$-values. An alternative is to fit the model

$$ Z_i = \alpha_0 + \alpha_1 X_i + \eta_i $$

Then the residual $\eta_i$ will be uncorrelated with $X_i$ and can, in some sense, be thought of as the part of $Z_i$ that is not subsumed by its linear relationship with $X_i$. Then, you can proceed to fit the model

$$ Y_i = \theta_0 + \theta_1 X_i + \theta_2 \eta_i + \nu_i $$

which will capture all of the effects of the first model (and will, indeed, have the exact same $R^2$ as the first model) but the predictors are no longer collinear.

Edit: The OP has asked for an explanation of why the residuals do not, definitionally, have a sample correlation of zero with the predictor when you omit intercept like they do when the intercept is included. This is too long to post in the comments so I made an edit here. This derivation is not particularly enlightening (unfortunately I couldn't come up with a reasonable intuitive argument) but it does show what the OP requested:

When the intercept is omitted in simple linear regression, $\hat \beta = \frac{ \sum x_i y_i}{\sum x_i^2}$, so $e_i = y_i - x_i \frac{ \sum x_i y_i}{\sum x_i^2}$. The sample correlation between $x_i$ and $e_i$ is proportional to $$\overline{xe} - \overline{x}\overline{e}$$ where $\overline{\cdot}$ denotes the sample mean of the quantity under the bar. I'll now show this is not necessarily equal to zero.

First we have

$$\overline{xe} = \frac{1}{n} \left( \sum x_i y_i - x_{i}^2 \cdot \frac{ \sum x_i y_i}{\sum x_i^2} \right) = \overline{xy} \left( 1 - \frac{ \sum x_{i}^2}{ \sum x_{i}^2 } \right) = 0$$


$$\overline{x} \overline{e} = \overline{x} \left( \overline{y} - \frac{\overline{x} \cdot \overline{xy}}{\overline{x^2}} \right) = \overline{x}\overline{y} - \frac{\overline{x}^2 \cdot \overline{xy}}{\overline{x^2}}$$

so in order for the $e_i$ and $x_i$ to have a sample correlation of exactly 0, we need $\overline{x}\overline{e}$ to be $0$. That is, we need $$ \overline{y} = \frac{ \overline{x} \cdot \overline{xy}}{\overline{x^2}} $$

which does not hold in general for two arbitrary sets of data $x, y$.

  • $\begingroup$ This reminds me of partial regression plots. $\endgroup$
    – Andy W
    Commented Jul 17, 2012 at 15:58
  • 3
    $\begingroup$ This sounds like an approximation to replacing $(X, Z)$ by their principal components. $\endgroup$
    – whuber
    Commented Jul 17, 2012 at 16:15
  • 3
    $\begingroup$ One thing I had in mind is that PCA generalizes easily to more than two variables. Another is that it treats $X$ and $Z$ symmetrically, whereas your proposal appears arbitrarily to single out one of these variables. Another thought was that PCA provides a disciplined way to reduce the number of variables (although one must be cautious about that, because a small principal component may be highly correlated with the dependent variable). $\endgroup$
    – whuber
    Commented Jul 17, 2012 at 16:22
  • 1
    $\begingroup$ Hi Macro, Thank you for the excellent proof. Yeah now I understand it. When we talk about sample correlation between x and residuals, it requires the intercept term to be included for the sample correlation to be 0. On the other hand, when we talk about orthogonality between x and residuals, it doesn't require the intercept term to be included, for the orthogonality to hold. $\endgroup$
    – Luna
    Commented Jul 18, 2012 at 17:55
  • 1
    $\begingroup$ @Luna, I don't particularly disagree with using ridge regression - this was just what first occurred to me (I answered before that was suggested). One thing I can say is that ridge regression estimate are biased, so, in some sense, you're actually estimating a slightly different (shrunken) quantity than you are with ordinary regression, making the interpretation of the coefficients perhaps more challenging (as gung alludes to). Also, what I've described here only requires understanding of basic linear regression and may be more intuitively appealing to some. $\endgroup$
    – Macro
    Commented Jul 19, 2012 at 14:35

You can try ridge regression approach in the case when correlation matrix is close to singular (i.e. variables have high correlations). It will provide you with a robust estimate of $\beta$.

The only question is how to choose regularization parameter $\lambda$. It is not a simple problem, though I suggest to try different values.

Hope this helps!

  • 2
    $\begingroup$ Cross-validation is the usual thing to do to choose $\lambda$ ;-). $\endgroup$
    – Néstor
    Commented Jul 17, 2012 at 16:03
  • 1
    $\begingroup$ indeed (+1 for answer and Nestors' comment), and if you perform the calculations in "canonical form" (using an eigen decomposition of $X^TX$, you can find the $\lambda$ minimising the leave-one-out cross-validation error by Newton's method very cheaply. $\endgroup$ Commented Jul 17, 2012 at 17:02
  • $\begingroup$ thanks a lot! Any tutorial/notes for how to do that including the cross-validation in R? $\endgroup$
    – Luna
    Commented Jul 17, 2012 at 17:44
  • $\begingroup$ Check out chapter 3 in this book: stanford.edu/~hastie/local.ftp/Springer/ESLII_print5.pdf. The implementation of ridge regression is done in R by some of the authors (Google is your friend!). $\endgroup$
    – Néstor
    Commented Jul 17, 2012 at 17:52
  • 2
    $\begingroup$ You can use the lm.ridge routine in the MASS package. If you pass it a range of values for $\lambda$, e.g., a call like foo <- lm.ridge(y~x1+x2,lambda=seq(0,10,by=0.1)), you'll get back the generalized cross validation statistics in foo, and can plot them against $\lambda$: plot(foo$GCV~foo$lambda) to pick the minimum. $\endgroup$
    – jbowman
    Commented Jul 17, 2012 at 17:59

I like both of the answers given thus far. Let me add a few things.

Another option is that you can also combine the variables. This is done by standardizing both (i.e., turning them into z-scores), averaging them, and then fitting your model with only the composite variable. This would be a good approach when you believe they are two different measures of the same underlying construct. In that case, you have two measurements that are contaminated with error. The most likely true value for the variable you really care about is in between them, thus averaging them gives a more accurate estimate. You standardize them first to put them on the same scale, so that nominal issues don't contaminate the result (e.g., you wouldn't want to average several temperature measurements if some are Fahrenheit and some are Celsius). Of course, if they are already on the same scale (e.g., several highly-correlated public opinion polls), you can skip that step. If you think one of your variables might be more accurate than the other, you could do a weighted average (perhaps using the reciprocals of the measurement errors).

If your variables are just different measures of the same construct, and are sufficiently highly correlated, you really could just throw one out without losing much information. As an example, I was actually in a situation once, where I wanted to use a covariate to absorb some of the error variance and boost power, but where I didn't care about that covariate--it wasn't germane substantively. I had several options available and they were all correlated with each other $r>.98$. I basically picked one at random and moved on, and it worked fine. I suspect I would have lost power burning two extra degrees of freedom if I had included the others as well by using some other strategy. Of course, I could have combined them, but why bother? However, this depends critically on the fact that your variables are correlated because they are two different versions of the same thing; if there's a different reason they are correlated, this could be totally inappropriate.

As that implies, I suggest you think about what lies behind your correlated variables. That is, you need a theory of why they're so highly correlated to do the best job of picking which strategy to use. In addition to different measures of the same latent variable, some other possibilities are a causal chain (i.e., $X_1\rightarrow X_2\rightarrow Y$) and more complicated situations in which your variables are the result of multiple causal forces, some of which are the same for both. Perhaps the most extreme case is that of a suppressor variable, which @whuber describes in his comment below. @Macro's suggestion, for instance, assumes that you are primarily interested in $X$ and wonder about the additional contribution of $Z$ after having accounted for $X$'s contribution. Thus, thinking about why your variables are correlated and what you want to know will help you decide which (i.e., $x_1$ or $x_2$) should be treated as $X$ and which $Z$. The key is to use theoretical insight to inform your choice.

I agree that ridge regression is arguably better, because it allows you to use the variables you had originally intended and is likely to yield betas that are very close to their true values (although they will be biased--see here or here for more information). Nonetheless, I think is also has two potential downsides: It is more complicated (requiring more statistical sophistication), and the resulting model is more difficult to interpret, in my opinion.

I gather that perhaps the ultimate approach would be to fit a structural equation model. That's because it would allow you to formulate the exact set of relationships you believe to be operative, including latent variables. However, I don't know SEM well enough to say anything about it here, other than to mention the possibility. (I also suspect it would be overkill in the situation you describe with just two covariates.)

  • 4
    $\begingroup$ Re the first point: Let vector $X_1$ have a range of values and let vector $e$ have small values completely uncorrelated with $X_1$ so that $X_2=X_1+e$ is highly correlated with $X_1$. Set $Y=e$. In the regression of $Y$ against either $X_1$ or $X_2$ you will see no significant or important results. In the regression of $Y$ against $X_1$ and $X_2$ you will get an extremely good fit, because $Y=X_2-X_1$. Thus, if you throw out either of $X_1$ or $X_2$, you will have lost essentially all information about $Y$. Whence, "highly correlated" does not mean "have equivalent information about $Y$". $\endgroup$
    – whuber
    Commented Jul 18, 2012 at 20:09
  • $\begingroup$ Thanks a lot Gung! Q1. Why does this approach work: "This is done by standardizing both (i.e., turning them into z-scores), averaging them, and then fitting your model with only the composite variable. "? Q2. Why would Ridge Regression be better? Q3. Why would SEM be better? Anybody please shed some lights on this? Thank you! $\endgroup$
    – Luna
    Commented Jul 19, 2012 at 14:22
  • $\begingroup$ Hi Luna, glad to help. I'm actually going to re-edit this; @whuber was more right than I had initially realized. I'll try to put in more to help w/ your additional questions, but it'll take a lot, so it might be a while. We'll see how it goes. $\endgroup$ Commented Jul 19, 2012 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.