I ran a logistic regression (in R using the glm function) and didn't find significance for a variable I expected to be significant (numerous articles have found significance). When I examined my data carefully, using interaction.plot(), I noticed a huge interaction effect between a co-variate (ethnicity) and this IV. When I included the interaction effect between ethnicity and this IV I do get a significant result. This is great but I want a scientifically sound/reproducible way of explaining why I chose to include this interaction effect in my logistic regression and not others (there is no established theory that would support having this interaction effect, though it is not surprising in hindsight). I ran glmulti() to see if it would tell me what interaction effects I should include. The following is my logistic test:

glm(DV ~ CV1+CV2+IV2+IV3+CV3*IV1, data=LR, family="binomial")

CV1 is sex (factor with two levels), CV2 is age (integer), CV3 is ethnicity (factor with 7 levels), IV1 (integer) is the variable of interest, IV2 and IV3 (factor with two levels). When I ran the following I get "DV ~ 1 + CV3 + IV1" which isn't showing an interaction effect.

gm <- glmulti("Depr", c("CV1","CV2","CV3","IV1","IV2","IV3"), data = LR, family="binomial", marginality=TRUE, exclude=c("CV1:CV2","CV1:CV3","CV2:CV3"))

1) what is an objective (scientifically/methodologically sound) way of determining which interaction effects to include in my logistic regression?

2) how do I do this in R? I suspect glmulti() may be wildly inappropriate for this as it is intended to model/predict.

3) related question: I have another independent variable but it is highly correlated with IV1 so I am not sure whether I should exclude it from the logistic regression. Removing it slightly increases the p-values of significant variables but not enough to make much of a difference.

Note: I saw a question related to mine (How to know which interaction terms to include in a regression model?) but I hope my question is more detailed and the only answer to that question recommended pre-existing theory in that area to determine interaction effects (which I don't have).


1/ If a limited number of interaction effects you could use a log-likelihood ratio test to check whether the model with one/several interaction effects performs better than model without them

2/ Otherwise I would use regularised regression techniques, especially LASSO which would set the least influential interaction effects to 0

Regarding your predictors - If two of them are highly correlated (how high exactly?) then safer to remove one of them

  • $\begingroup$ Thanks, #2 seems like what I want. Unfortunately I'm having trouble both understanding the concepts behind LASSO and even attempting to implement it in R using glmnet() or Lasso() (though I assume with a better understanding of the concepts that would fall into place). I cant conceptualize what lambda is. Any recommendations for a site/video that explains everything from the bottom up clearly and coherently? Also will LASSO really give me interaction effects, I haven't seen them in any of the examples? $\endgroup$ – B.Kenobi Mar 17 at 11:53
  • $\begingroup$ Lambda is an "arbitrarily" defined parameter controlling the amount of penalization - Basically for very high lambda values you would constrain more of your model parameters to be null. LASSO will work with interaction effects, but you might be interested in a modified procedure called "group LASSO" (initially LASSO procedure treats the parameters separately and this might not be appropriate when working on interaction effects as some parameters should be penalized together) $\endgroup$ – Umka Mar 18 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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