# Adding confounding covariate as interaction nullifies difference between treatments

I have a within-subject study with three conditions. These three conditions each start with a neutral priming task or one of two mood priming tasks. The priming task should increase the mood of the participants. Afterwards the mood of the participant is assessed. Subsequently, participants have to carry out a task. In the end the mood of the participants is again assessed. Mood is a continuous measurement. So these are the sequences for the conditions.

Condition 0: Neutral Prime --> Mood Before Measurement --> Task --> Mood Afterwards Measurement

Condition 1: Positive Mood Prime 1 --> Mood Before Measurement --> Task --> Mood Afterwards Measurement

Condition 2: Positive Mood Prime 2 --> Mood Before Measurement --> Task --> Mood Afterwards Measurement

Furthermore I construct the variable Mood Mean = mean("Mood Before", "Mood After").

The questions I want to answer are:

1. How do condition 1 and 2 differ and how do the differ from condition 0 (regarding the effect on "Mood Mean")?
2. Does the "Mood Before" differently affect the "Mood Mean" in condition 1 and 2?

Here is a depiction of the data with a geom_smooth("lm") estimation of a regression line.

First of all, I looked at the following model by using the lmer package in R:

Mood Mean ~ condition + (1|subject)

            Estimate Std. Error       df t value Pr(>|t|)
(Intercept)  3.45667    0.34789 14.00000   9.936 1.01e-07 ***
cond2-1      0.07333    0.33026 28.00000   0.222   0.8259
cond3-2      0.90333    0.33026 28.00000   2.735   0.0107 *


Secondly, I added the confounding covariate "Mood Before". Not surprisingly "Mood Before" is positive significant for "Mood Mean". However, suddenly condition 3 has a significant negative effect.

Mood Mean ~ condition + "Mood Before" + (1|subject)

            Estimate Std. Error       df t value Pr(>|t|)
(Intercept)  0.95506    0.22927 32.90725   4.166 0.000211 ***
cond2-1     -0.03125    0.12997 27.17853  -0.240 0.811819
cond3-2     -0.44624    0.15931 31.43759  -2.801 0.008640 **
MoodBef      0.74700    0.05115 38.94199  14.605  < 2e-16 ***


Looking at the plot this is not surprising and probably caused by the distribution of the data in the different conditions.

To answer my question I am however interested in the interaction, which also should eliminate the problems from the last model.

Mood Mean ~ condition*"Mood Before" + (1|subject)

                Estimate Std. Error       df t value Pr(>|t|)
(Intercept)      1.03445    0.23109 33.18753   4.476 8.47e-05 ***
cond2-1         -0.27857    0.23564 25.68119  -1.182   0.2480
cond3-2          0.20966    0.35517 26.77482   0.590   0.5599
MoodBef          0.73876    0.04970 35.68675  14.865  < 2e-16 ***
cond2-1:MoodBef  0.08902    0.07347 25.82894   1.212   0.2366
cond3-2:MoodBef -0.17376    0.08266 26.20974  -2.102   0.0453 *


The difference in slopes between condition 3 and 2 are clear.

But why does the effect of condition on Mood Mean disappear?

Is my interpretation of this linear model wrong or should I add the covariate "Mood Before" in a different way?

• The crowding of the numbers in the plots makes quantitative interpretation difficult, but would it be fair to say that the mean value of "mood before" under condition 2 is greater than its mean value in the other conditions?
– whuber
Jan 11, 2022 at 20:50
• @whuber I agree that the crowding is a problem but it is of course created by the "treatments" under the different conditions. Do you mean the mean value of "Mood Mean"? From visual inspection and the first model I would say it is greater in condition 2 than in the other conditions. Jan 11, 2022 at 21:04
• That comment is a hint concerning how to resolve your question.
– whuber
Jan 11, 2022 at 21:06
• @whuber I don't know how I forgot about his. So you mean I should center the data around the mean for every condition? Jan 12, 2022 at 8:49

It seems like this is an issue with interpreting interactions. The coefficient on a "main effect" term when that variable is in an interaction is the effect of that variable when the other variable in the interaction has a value of 0. So, the value 0.20966 for cond3-2 is the difference between the predicted means of Mood mean for condition 3 vs. condition 1 when Mood Before is 0. As you can see, Mood Before is never 0, so this value is essentially meaningless.