As a continuation of a previous topic, I would like to address a similar experience.

Subjects completed an experiment in which their electrodermal activity was recorded. For each subject there are 72 observations, making the dataset ~40000 obs. long.

  • As a depended variable is the electrodermal response amplitude of a subject for each observation.
  • As fixed effects are binary variables (and their interaction), such as whether a subject had faced childhood maltreatment during the early year and whether they have experienced recent adversities.
  • The variable "Subject" gets to be my random effect within the lmer function.

In R that would be translated into:

lmer(formula = response.Amplitudes ~ childhood.Adversity * 
               recent.Adversity + (1|Subject), data = data)

Using anova and not the mixed a effected models, that would be:

aov(lm(response.Amplitudes ~ childhood.Adversity * 
          recent.Adversity, data = data)

The outcome of the first (mixed effects) formula gives a significant main effect of one of the fixed effects while an anova gives a high significance of both main effects and the interaction. Which is a huge difference

Obviously, the most logical explanation is that in my random effect, that of Subject, there is a huge variance.

Now, my question is: If this is the case, how can I prove that the huge difference between the models lies on the variance in the random effect? Is there a way to prove this, other than just looking at the outcome?

** Since I am new to the mixed models and that statistical approach, I recognize that the way of describing the problem lacks information or may be misleading. Please, let me know if I can provide any further information to make it more accurate.

  • $\begingroup$ If you have a repeated measures design, your ANOVA is clearly not appropriate (because the independence assumption is violated) and you shouldn't even look at its result. You can compare an lmer fit with a corresponding lm fit with the anova.merMod method, i.e., anova(lmer(y ~ x + (1 | g)), lm(y ~ x)). $\endgroup$
    – Roland
    Mar 2, 2022 at 12:31

2 Answers 2


You can use any ANOVA or Kruskal Wallis test to see if the subject affects the outcome using formula response.Amplitudes ~ Subject. Just test if Subject is significant here. If yes, you might have a Simpson's paradox here. You can test how big this influence is by calculating the R2 of the response.Amplitudes ~ childhood.Adversity * recent.Adversity + (1|Subject) model e.g. using Nakagawa's R2.


Many thanks for your fast responses. It turns out, as @Roland suggested, that the independency is violated with the repeated measures. That is the reason for the odd result of the anova.

Creating a new data frame with a single mean for each subject and then running an anova, returns the same result as the mixed models.

@danloo thanks for the Nakagawa package, I did not know about it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.