This is my first repeated measures analysis.
Subjects in two groups exercise until "peak" level. Blood is taken at baseline (prior to exercise), peak, 2hrs post, 24 hrs post, and 72hrs post. Levels of various proteins are measured in the blood samples.
Groups: 2 (mutation for disease, control)
Subjects: N
Time Points (exercise): 5 (baseline, peak, 2hr, 24hr, 72hr)
Outcome: continuous variable (protein expression)
Is this description right?
If there is a group effect, then there would be an interaction between group and time. The lack of independence comes from the repeated measurements on the same subjects, so there should be a random effect with time. Because the two groups likely have different baseline measurements, I need to include both random intercepts and random slopes.
Does this seem like the right formula?
outcome ~ subject + group*time + (1 + subject|time)
Edit
Based on the comment below, is this right?
outcome ~ group*time + (1 + time | subject)
subjects
have your repeated measurements within them, thensubjects
form the basis for your random effects. In that case you shouldn't list it as a fixed effect (as you do right after the "~") and it should be after the "|" symbol in the random term. Please edit the question to fix that, so that you can get better advice on the statistical issue of how/whether to use random slopes. $\endgroup$subject
labeled so that there aren't the same "subjects" in both groups ? That is, do you do not have "Subject 1
" in Group 1 and Group 2 ? $\endgroup$