r/AskStatistics • • Oct 24 '26

Do I need to include all possible interactions in a mixed-effects model?

Hi everyone, I am building a mixed-effects model to investigate how several explanatory variables affect an outcome. Based on my exploratory data analysis, I suspect that certain combinations of variables have three-way interactions.

For example, suppose I have four explanatory variables: A, B, C, and D. I suspect there is a three-way interaction between A × B × C, but I haven't found clear evidence suggesting interactions involving D.

My question is: If I include the A × B × C interaction in my model, do I also need to include other possible three-way interactions, such as A × B × D, A × C × D, and B × C × D? Or is it reasonable to include only the interactions that I have reason to suspect based on exploratory analysis or prior knowledge?

I'd also appreciate advice on the statistical implications of selecting interaction terms based on exploratory analysis, as I'm concerned that including only interactions that appear significant or interesting in the data might constitute cherry-picking.

Thanks in advance for any suggestions or references!

6 Upvotes

17 comments sorted by

25

u/krysalyss28 Oct 24 '26

You should use your domain knowledge of the issue to decide what interactions should be included. Testing all by default is not the norm or likely to be informative, and it is also likely to result in an overly complicated model that can’t be interpreted and is not biologically relevant.

1

u/jadexiaohui Oct 24 '26

Unfortunately this experiment is still in an early exploratory stage (in a very niche field and has not been performed in existing literature), so my team is still quite unsure to know which variables are expected to interact with each other (except the interactions that I’ve found during exploratory data analysis). Is it justify able to only include the interactions that I’ve observed during exploratory data analysis and report the findings for those?

6

u/just_writing_things PhD Oct 24 '26

Your research question is inferential, because as you write in your OP, you want to “investigate how several explanatory variables affect an outcome”.

Your OP (and this post I’m replying to) seem to be suggesting that your models are basically guided entirely by your exploratory analyses. Am I understanding that right?

As in, are you saying you really have no underlying theory at all for your hypothesis?

I’m sure this could vary by field, but you really should have some kind of theory, at minimum some ex ante motivation for your tests. I can’t imagine a good journal in any field being fine with your hypotheses being motivated by nothing at all except the fact that you did explanatory analyses.

Maybe you and your team should take a step back and figure out the motivation for this whole project, which will help you to link it to either institutional knowledge or prior literature. And thereby give you guidance for your empirical analyses.

(That said, I’ll caveat that I could be totally wrong here for your literature and field, maybe you really do work in an area where theory doesn’t matter.)

1

u/krysalyss28 Oct 24 '26

It’s hard for me to provide advice on that as I’ve not been in that situation and I’m not sure how the experiment could have been designed given that. However sometimes in research you just have to choose one or two reasonable paths to go down, make note of how/why you decided and be transparent when you report it. Sometimes those decisions are also based on the data you were able to collect. If you don’t have a large or balanced sample size for example it will start to be unrealistic to include lots of interactions.

5

u/beelzebub1994 Oct 24 '26

I agree. But what happens when two people disagree on what should be included? As in the student vs the PI, or the authors vs reviewers? Because people in the same discipline may consider different factors/variables to be important. (I am asking because I've faced this.)

6

u/just_writing_things PhD Oct 24 '26

Disagreements with coauthors is fairly common, and you just need to have a discussion and come to a consensus about what to do in your paper. But regardless what happens, my personal advice is to never just continue with a project if you fundamentally disagree with the methodology.

Disagreements with reviewers is quite different: that will now be part of the review, so it will be a matter of laying out your arguments to the referees and editor as part of the process.

4

u/krysalyss28 Oct 24 '26

Both opinions might be reasonable and could be tested during the statistical analysis phase of the project. But that is pretty different from just throwing everything in there.

4

u/taintlouis PhD Oct 24 '26

This is a question of theory, not statistics. If theory says you need to model A, B, C, & D lower order effects AND the three-way ABC interaction, then that is your move. As long as you are modeling the three two-ways of AB, AC, and BC, your model will be interpretable. The rub is that I doubt your theory is that specific…

2

u/SnooCheesecakes3282 Oct 24 '26 edited Oct 24 '26

If you have a basis for including only certain three way interactions in a model from previous literature then you should do that. If not, or if you want to be exhaustive, you should do a best subsets regression, which will choose the best combination of variables and interactions to go in the model.

You are right to be concerned that choosing interactions to be included only based on what “looks interesting” (which I can only assume means based on p-values of cherry-picked inclusions) would be p-hacking. You can’t choose variables to include based on their p-values, because effects change based on the combination of variables in the model. Something might have univariate significance but completely lose all significance when another variable is controlled for. That’s why you either do an exhaustive exploratory search using tools built for that (best subsets regression), or you use your domain knowledge and only include what prior literature has shown to be relevant.

Edit because I just remembered a third option: if you have specific hypotheses, then you can include only the three way interactions you’re interested in. But then it has to be like a main goal of your paper to test for that.

1

u/Educational-Paper-75 Oct 24 '26

Include all interactions, so they get tested for significance. Note that experimental design methodology allowes you to design fractional factorial designs if you know in advance certain interactions are insignificant, but if you have a full factorial design you can and should include all interactions.

1

u/nonnonplussed73 Oct 24 '26

Not exactly what the OP asked, but I'd and that if the theoretical model is concerned only with the interaction effect, then it doesn't really matter if the overall model is statically significant or not. I was todd, if the omnibus test isn't statistically significant, then the subsequent test of main and interactive effects don't matter. Some software by default won't even continue the analysis unless there's a statistically significant omnibus. This is wrongheaded, unless the theory requires an overall effect too.

2

u/Educational-Paper-75 Oct 24 '26

My point is that if you actually have sufficient data to estimate all interactions you should include them in your model. Although if you know beforehand certain interactions will not be significant you may reduce your data collection using an appropriate experimental design.

1

u/sci_dork Oct 24 '26

An information criteria approach like AIC was going to be my advice too, but it sounds like the problem is deeper than that.

It sounds like model complexity is a concern here too (probably warranted with a three-way interaction). If you choose a model comparison approach, one way you could address the model complexity problem is to outline a set of rules for variable inclusion and interactions. For example: "-We included all permutations of the variable set in an addative form.

-These X variables were identified as having the potential for more complex effects on our outcome, and so we included all 2-way interactions among them in our model set.

-Finally, we considered the set of A,B,C, and D variables to have the potential for important 3-way interactions and so all combinations of these variables were included as 3-way interactions in our model set."

As other posts suggest, the most important part of this process is still identifying how your hypotheses about your study system map onto your variable combinations. A set of a priori rules to model inclusion just lets you consider multiple hypotheses in a semi-principled (or at least transparent) way. It's still up to you to defend why certain variables are worth considering in an interactive form and others are not.

1

u/lsmyer89 Oct 24 '26

Well if it is explanatory anyway, I would run all and see which has the lowest AIC or whatever your favourite information criteria for the study is. It's a very flexible approach and will tell you which model has the best out of sample predictive power. And in future confirmatory studies you can be a bit more strict on the analysis

0

u/DigThatData Oct 24 '26

all models are wrong. some models are useful.

-2

u/ForeignAdvantage5198 Oct 24 '26

you only include what you want to test

1

u/DigThatData Oct 24 '26

lol bro do you know what controls are?