Skip to main content
2 of 2
typo
Julian
  • 383
  • 3
  • 10

Building upon sjp's answer, I'd suggest a slightly more complex model that may be simplified if necessary. You've said that pilots were placed in groups so group-specific effects may occur and that perfomance differences are likely to change between campaigns which the groups were placed in. So to me it sounds like a more complex multilevel/hierarchical model that should account for the nested structure of pilots within groups within campaigns. So, I would suggest:

model <- lmer(errors ~ Campaign + Group + Session + Scenario + scale(Age) + Gender + Session:Group + Session:Campaign + (1 | Pilot / Group / Campaign), data = df)

Besides ggplot2 and effects you can also check out performance for model's performance analysis and some nice visualisations.

Julian
  • 383
  • 3
  • 10