Interactions Three Ways: Observed, Partial, and Predicted (Pan et al., 2013)
Authors
Reinhold Kliegl
Jinger Pan
Published
2026-08-28
After working through this page you will be able to:
distinguish three complementary views of a model term — the observed relationship, the partial-effect view (remef / MixedModelsExtras.partial_fitted), and the predicted (marginal) view (Effects.jl);
read each of the significant interactions in m09 off a consistent three-panel figure;
explain why an interaction that is invisible in the raw data can be obvious in the partial-effect plot.
NoteBefore you start
Prerequisite:Eye–Voice Span in Rapid Automatized Naming — this page reuses its preferred model m09 and its cached fit. Read that page first for the background, the data, and the model-building steps.
Data used:pylsk13.rda (examples/eyevoicespan/).
1 Why three panels?
Model m09 from the companion page has four reliable interaction terms. Each one describes how the slope of one predictor changes with another, but a raw scatterplot rarely shows that directly: the other twelve terms in the model, the by-child random intercept, and the residual noise are all superimposed on it.
Three views pull the term apart:
View
What it shows
How it is computed
Observed
log(RAN) against the predictor, split by the moderator, with an ordinary least-squares line per group
nothing removed — the raw data
Partial
the same, after subtracting every model term except the target interaction and its lower-order relatives, and the random intercept
partial_fitted(m09, keep; mode=:include) .+ residuals(m09) — the Julia analogue of R’s remef(..., keep=TRUE, grouping=TRUE, ran=NULL)
Predicted
the model’s fitted mean on a regular grid, with a 95% confidence band, holding the other predictors at typical values
Effects.effects(grid, m09; level=0.95)
The observed panel is honest about scatter but confounded. The partial panel keeps the residual scatter (so you can still judge influence and fit) while removing the confounds. The predicted panel removes the scatter too and adds proper inferential uncertainty, but it averages over the predictors that are not on the grid — so it can look weaker than the partial view when a moderator you have collapsed also interacts with the x-axis variable.
All four are reliable: Condition & evs_c (p ≈ .002), Group & evs_c (p ≈ .001), evs_c & gaze_c (p ≈ .001), and the three-way Condition & Group & evs_c (p ≈ .006).
3 Partial responses
partial(keep) returns the observed response with every term not in keep removed, plus the by-child random intercept removed — exactly what remef(m09, fix = keep, keep = TRUE, grouping = TRUE, ran = NULL) produces in R. grouping = TRUE means “also keep every lower-order term built from the same variables”, which here we spell out explicitly in each keep vector.
Figure 1: The eye–voice-span slope by naming Condition. Observed: both slopes negative. Partial: only digit retains a slope once Group and gaze are removed. Predicted: same pattern, averaged over Group (hence weaker) and with model uncertainty.
A larger eye–voice span goes with faster naming, and the partial panel shows this benefit is carried almost entirely by digit naming: once the (also reliable) Group × EVS term and everything involving gaze are stripped out, the dice slope is essentially flat. The predicted panel collapses over Group, so its digit/dice lines separate less — the interaction is real but the marginal prediction dilutes it.
Figure 2: The eye–voice-span slope by Group. The EVS benefit is concentrated in the control children.
The partial panel isolates the mirror-image of Figure 1: the steep negative EVS slope belongs to the control group, while the dyslexic slope is shallow. Substantively, a wide eye–voice span — reading ahead of the voice — pays off more for the children who are already fluent.
Figure 3: The gaze-duration slope at low, mid, and high eye–voice span (tertiles). Observed: the three slopes are nearly identical. Partial and Predicted: the gaze slope is steeper when the eye–voice span is short.
This is the clearest demonstration of what the partial view buys you. In the raw data the gaze-duration slope looks the same at every eye–voice span. After removing the Condition, Group, and random-intercept contributions, a fan opens up: longer gaze durations cost more (steeper positive slope) when the reader is not looking far ahead. The predicted panel confirms the crossing pattern with confidence bands.
Figure 4: The three-way interaction (Figure 1 of Pan et al., 2013). The negative EVS slope is specific to the digit / control cell.
Putting Condition and Group back together: the partial panel shows three flat cells and one steeply declining one — digit naming in control children. The EVS benefit found in Figures 1 and 2 is not additive; it is a property of that single cell. Because the three-way grid here retains all the non-gaze structure, the predicted panel now agrees closely with the partial panel — nothing has been averaged away.
9 Takeaways
Read an interaction from the partial panel: it removes the confounds that hide the term in raw data while keeping the scatter that tells you how well it is determined.
Use the predicted panel for inference (confidence bands) and for communicating a clean model summary — but remember it averages over whatever you left off the grid.
When the partial and predicted panels disagree (Figures 1–3) it is usually because a collapsed moderator also interacts with the x-axis variable; when they agree (Figure 4) the grid already contains everything that matters.
10 References
10.1 Exercises
Keep the random intercept. Recompute pf_CG_evs with Dict(:Subj => ["(Intercept)"]) instead of Dict(:Subj => String[]). What changes in the partial panel, and which R remef argument does this correspond to?
NoteSolution
Each point moves vertically by that child’s estimated random intercept (± ~0.1 on the log scale), so the within-cell scatter grows and the cells separate a little more by their child composition. It corresponds to remef(..., ran = list("(Intercept)")) (keep the by-subject intercept) rather than ran = NULL.
Effects grid resolution. In Figure 3 the predicted lines are evaluated at three EVS values (the tertile medians). Replace them with five quantiles. Does the qualitative “fan” conclusion change? What is the cost?
NoteSolution
The conclusion is unchanged — the gaze slope still decreases monotonically as EVS grows. The cost is only visual: five overlapping bands are harder to read than three, and the extreme quantiles are supported by fewer observations, so their bands are wider.
A non-significant term. Build a three-panel figure for Condition × gaze_c (p ≈ .16 in m09). What do you expect the partial panel to look like, and why is that the right null result to show learners?
NoteSolution
The two partial slopes should be nearly parallel — the interaction coefficient is small and uncertain. Showing it next to the significant interactions makes the point that the partial-effect plot is not a device for manufacturing patterns: when the term is null, the plot looks null.
This page was rendered from git revision 29e8d33
using Quarto 1.10.18 and Julia 1.12.7.