ScholarSignal

Guides · Methods and evidence

Moderation analysis: how to test and probe interaction effects

Moderation analysis tests whether the effect of one variable on an outcome changes with the level of another, usually with a regression that includes their product. The standard model assumes the effect changes linearly with the moderator, and in replications of published studies that assumption held in only about half the cases. Before probing an interaction with simple slopes or Johnson-Neyman intervals, plot the raw data, check where the moderator has enough observations, and use flexible estimators when effects may be curved. Interactions also need much larger samples than main effects, so plan the sample for the interaction you expect.

What moderation analysis tests

A moderator changes the relationship between an outcome and an independent variable. The workhorse model is a regression with a multiplicative term, in which the outcome depends on the treatment, the moderator and their product; the coefficient on the product tells how the effect of the treatment changes as the moderator rises.[1]

Interaction hypotheses are everywhere. Simonsohn counts tests of interactions in 71% of the articles in one month's issues of three leading psychology journals, and Hainmueller, Mummolo and Xu describe the multiplicative interaction model as the most widely used framework for conditional hypotheses in applied social science.[2][1]

The usual workflow has three steps: estimate a model that assumes linear effects, test whether the interaction coefficient differs from zero, and then probe the interaction by computing the effect of one variable at chosen values of the other. Each step rests on the linearity assumption made in the first.[2]

Probing interactions: simple slopes, spotlight and Johnson-Neyman

Simple slopes report the effect of the focal variable at specific values of the moderator, often one standard deviation above and below its mean. Spotlight analysis and pick-a-point are names for the same idea. The Johnson-Neyman procedure, also called floodlight analysis or regions of significance, estimates the effect at every value of the moderator and shows where it is significant.[2]

These tools are only as good as the model they probe. With a linear model, the estimated effect is forced to change at a constant rate across the whole moderator range, so probing reports a straight line even when the true effect bends, and can report an effect where there are almost no data.[1][2]

Simonsohn illustrates the risk with weight, age and gender: males become heavier than females from about age 14. A linear interaction model cannot represent that pattern, and probing it across all ages confidently but falsely concludes that baby girls are substantially heavier than baby boys.[2]

The linearity assumption often fails

Hainmueller, Mummolo and Xu replicated 46 interaction effects from 22 articles published between 2006 and 2015 in five top political science journals. The effect of the key variable changed linearly with the moderator in only about 48% of cases.[1]

Once the linearity assumption was relaxed, in roughly 70% of cases they could not reject that the effect was equal at typical low and typical high values of the moderator, the claim the original interaction rested on. Their conclusion is that a large share of these findings were modelling artifacts or at best highly model dependent.[1]

They also cite a large replication project in psychology in which significant interaction effects replicated far less often than main or simple effects, 22% against 47%.[1]

Simonsohn adds that curvature matters differently for testing and for probing. When the focal variable or the moderator is randomly assigned, the omitted nonlinear parts are uncorrelated with the interaction term, so testing the interaction with a linear model is fine. With observational data, where the two variables are usually correlated, ignoring nonlinear effects biases the interaction estimate and inflates false positives, in realistic situations up to 100%. Probing is affected in both kinds of data.[2]

Lack of common support

Estimating the effect of a treatment at a given value of the moderator requires enough observations near that value and variation in the treatment there. Without both, the estimate is an extrapolation of the assumed functional form into a region with few or no data, and it is fragile and model dependent.[1]

This kind of extrapolation was very common in the replicated studies. Articles typically reported conditional effects across the entire range of the moderator, including long stretches with few or no observations, and some reported effects at moderator values where the treatment did not vary at all.[1]

Diagnostics and more robust estimators

Hainmueller and colleagues recommend starting with a plot of the raw data. With a binary treatment, plot the outcome against the moderator separately for the treated and control groups and overlay a straight regression line and a smooth fit; if the two lines diverge, the linear model is misspecified. With a continuous treatment and moderator, split the sample into terciles of the moderator and plot the outcome against the treatment in each.[1]

Their binning estimator splits the moderator into three equally sized bins, estimates the effect within each and evaluates it at the bin medians; more bins can be used with more data, and the number can be fixed in a pre-analysis plan. A kernel estimator gives a more flexible view of how the effect varies. Both should be shown with a histogram of the moderator under the effect plot so readers can see where the data are thin.[1]

Simonsohn compares three ways to relax linearity: dichotomizing the moderator, adding squared terms of both variables, and generalized additive models, which estimate the shape of each effect from the data and penalize overfitting. In his simulations, adding squared terms performed surprisingly well for testing interactions with observational data, but the additive models had lower false-positive rates and higher power.[2]

The two papers disagree on one point. Simonsohn argues that splitting the moderator into bins does not fix the bias that arises in observational data when correlated predictors have nonlinear effects, so binned results can be as invalid as the linear model they are meant to improve.[2]

Sample size and power for moderation

Interactions are usually smaller than main effects, and their size depends on their shape. In the worked example of Sommet and colleagues, a typical main effect of d = .35 needs 256 participants for 80% power, while an effect of that size that appears in one group and is absent in the other needs 1,024, four times as many.[3]

A reversed interaction, where the effect flips sign between groups, is as large as a typical main effect; a fully attenuated one, where the effect disappears, is half that size; a partially attenuated one, where the effect only shrinks, can be nearly five times smaller. In their review of 159 recent studies, the median power to detect an interaction of typical size was .18.[3]

Measurement error in the moderator lowers power in proportion to the error, and unequal subgroups cost power too, about 5% at a 2:1 ratio and 33% at 9:1. Preregistered one-tailed tests, mixed designs with a within-participant factor and preregistered contrasts for fully attenuated interactions can raise power without more participants.[3]

Checklist for reporting a moderation analysis

The evidence behind this

More guides on methods and evidence

References

  1. Jens Hainmueller, Jonathan Mummolo, Yiqing Xu (2019). How Much Should We Trust Estimates from Multiplicative Interaction Models? Simple Tools to Improve Empirical Practice. Political Analysis.
  2. Uri Simonsohn (2024). Interacting With Curves: How to Validly Test and Probe Interactions in the Real (Nonlinear) World. Advances in Methods and Practices in Psychological Science.
  3. Nicolas Sommet, David Laurence Weissman, Nicolas Cheutin, Andrew J. Elliot (2023). How Many Participants Do I Need to Test an Interaction? Conducting an Appropriate Power Analysis and Achieving Sufficient Power to Detect an Interaction. Advances in Methods and Practices in Psychological Science.

Bibliographic details only. Follow the DOI to read each study at its publisher.

Guide written by ScholarSignal from the studies listed above. Last reviewed 2026-10-19.

Building on this evidence?

ScholarSignal checks a new research idea against the closest existing work and an editor rubric, and tells you whether the contribution is new enough for the journals you target.

Evaluate my idea for free