2
$\begingroup$

I am trying to learn how to analyze data using linear mixed effects. Specifically, I'm not sure how to handle a grouping variable that's part of my data set.

Here's a sample scenario: Let's say I am interested in the effect difficulty has on the time to read short paragraphs. There are three versions of each paragraph: Easy, Moderate and Hard and difficulty is repeated-measures. So, each subject will read 6 short paragraphs, 2 at each level of difficulty.

I will also construct a grouping variable to control for order of condition. Subjects will be assigned to one group (so essentially, I have an independent groups variable). In this case, each group will contain a specific sequence of the paragraphs in the conditions. For example, Group 1 will get Paragraphs 1 & 5 in the easy condition, paragraphs 2 & 6 in the moderate condition and 3 & 4 in the difficult condition. Group 2 will get paragraphs 3 & 4 in the easy condition, 1 & 5 in the moderate condition and 2 & 6 in the difficult condition. Group 3 will receive Paragraphs 2 & 6 in the easy condition, Paragraphs 3 & 4 in the moderate condition and paragraphs 1 & 5 in the difficult condition.

So, when I lay out the data in long format, I have something like:

https://docs.google.com/document/d/1HFYzAKnK1g3X_-V6ouRiArlqpNo9IRjSiPmAS-WwcT4/edit

My fixed effect is difficulty and random effects are subject and items. However, I'm not sure how to treat the grouping variable. Can I just eliminate the grouping variable -- when items are included, the grouping variable seems redundant. If I can't eliminate the grouping variable, should I treat it as a fixed effect or random effect? The grouping variable is not of interest -- it's just a sequence of items that move together across conditions.

I apologize if I have not been clear -- as I indicated I am learning LMM now. But thank you for your help and advice you can give.

$\endgroup$

1 Answer 1

0
$\begingroup$

From what I understand of the study design, the grouping variable is simply based on the paragraphs read. Therefore, if you include paragraph as a grouping variable for random intercepts, for example using:

time ~ difficulty + (1 | paragraph) + (1 | subject)

then you will not need to include group in the model at all.

$\endgroup$

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.