2
$\begingroup$

I am modeling reaction times in a GLMM using the lme4 package. My data have the following structure:

  • Subject ID
  • Reaction times (RT)
  • Distractor type (Type): (3 levels): moving - static - no distractor
  • Distractor content (Content): (3 levels): neutral - positive - negative, existing only as a "subcondition" for trials with a moving or static distractor.

Subjects were randomly assigned to three groups (corresponding to distractor type, manipulated between subjects). Looking at the subjects in the conditions with distractors only, this model gives a good fit and interpretable results:

 model_1 <- glmer(RT ~ Content*Type+ (1 + Content| SubjectID), data = InputData, family = inverse.gaussian(link = "identity"))

Comparing all three distractor types across all three groups, ignoring content, is straightforward:

  model_2 <- glmer(RT ~ Type + (1  | SubjectID), data = InputData, family = inverse.gaussian(link = "identity"))

Model_2 clearly shows large difference between the "no distractor" and both "distractor" conditions, but of course this disregards the distractor subconditions (e.g., it could very well be that the overall difference is driven by a difference between, say, negative distractors versus no distractors only).

Thus, I'm trying to come up with a model formulation incorporating all three groups, enabling investigation of fixed main and interaction effects as in model_1, bearing in mind that Content only exists as a subgroup in two levels of the Type-factor. I've tried working from the example under "partially nested models" as mentioned here, but due to the different factor hierarchy I can't seem to transpose the solution to this context.

I would be really grateful if anybody could help out!

Edit: example data structure

ID DistractorType DistractorContent RT (dependent)
1 Static Positive 1751
1 Static Neutral 1081
1 Static Positive 1288
1 Static Negative 1117
1 Static Neutral 934
2 Moving Negative 724
2 Moving Negative 1756
2 Moving Neutral 1268
2 Moving Positive 1513
2 Moving Neutral 602
3 None NA 930
3 None NA 824
3 None NA 1125
3 None NA 758
3 None NA 1130

(In the real dataset, there are many more responses per ID).

$\endgroup$
1
  • 1
    $\begingroup$ Could you post some example data? $\endgroup$ Sep 8, 2021 at 10:36

0

Your Answer

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

Browse other questions tagged or ask your own question.