I have modeled whether a bird is detected by an antenna (1=yes, 0=no) with the following predictor variables: length of visit, species, and site. Individual ID is a random effect.

I am not also wondering, and think it could be valuable to see whether a bird took a seed(1=yes, 0=no) would also determine whether a bird is detected by an antenna.

So the model would look like this:

mod <- glmer(success_rfid ~ length + species + site + success_seed + (1|id), family = binomial( link = "logit"), data = data)

The output looks like this:

Fixed effects:
              Estimate Std. Error z value Pr(>|z|)    
(Intercept)    -4.4283     0.9780  -4.528 5.95e-06 ***
length          0.1921     0.1205   1.594   0.1110    
speciesTUTI     1.5201     0.7887   1.927   0.0539 .  
speciesWBNU     1.2716     0.8844   1.438   0.1505    
siteL3         -0.7220     0.7591  -0.951   0.3415    
siteYB2        -0.1024     0.8637  -0.119   0.9057    
success_seed1   3.1105     0.7296   4.263 2.01e-05 ***

My initial reaction is "Oh, no I can't do this. Length of a visit predicts success of taking a seed. Those are correlated and couldn't be in the model."

And then I'm left wondering what to do.

  • $\begingroup$ Why can't correlated explanatory variables be included in the model? $\endgroup$
    – whuber
    Nov 19, 2019 at 21:24

1 Answer 1


You can include correlated variables in a linear regression model if you want, but there are a couple of caveats.

  1. The interpretation is a bit dicey, because a unit increase in one will also likely lead to an increase in the other, so you can't think of the coefficients in isolation.
  2. The model may overfit and offset the two correlated variables (e.g. one will have a large positive coefficient and one will have a large negative coefficient). To fix this, you can use a regularized regression model.

You can also use PCA to create regressors that are orthogonal.


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.