help > RE: Within-subjects design longitudinal analysis with three time points.
Mar 2, 2021  12:03 AM | Andrew Zalesky
RE: Within-subjects design longitudinal analysis with three time points.
Ok - if there was no rank deficiency warning, perhaps I have simply misinterpreted the design. 

Here is a previous post, where I discuss this issue in detail: 

Here is a link to some nice slides on modelling a 2x2 repeated measures (slides 78-79):

http://mumford.bol.ucla.edu/setting_up_d...
Here are some detailed instructions:
Suppose the data is order according to the following rows (2 groups, 2 time points, 2 subjects per group):
Group 1 Time 1 Subject 1
Group 1 Time 1 Subject 2
Group 1 Time 2 Subject 1
Group 1 Time 2 Subject 2
Group 2 Time 1 Subject 3
Group 2 Time 1 Subject 4
Group 2 Time 2 Subject 3
Group 2 Time 2 Subject 4
The your design matrix would look like:
1 0 0 0 1 1
0 1 0 0 1 1
1 0 0 0 -1 -1
0 1 0 0 -1 -1
0 0 1 0 1 -1
0 0 0 1 1 -1
0 0 1 0 -1 1
0 0 0 1 -1 1
Where the first four columns model the individual means of each subject, the 5th column models the main effect of time and the 6th column models the group x time interaction.
The contrast for the main effect of time is either: [0 0 0 0 1 0] or [0 0 0 0 -1 0]
The contrast for the interaction is: [0 0 0 0 0 1] or [0 0 0 0 0 -1]
The exchange block should be set as: [1 2 1 2 3 4 3 4]
Select either t-test of F-test, as appropriate.
If you want to test the main effect of group, then a repeated measures design is not particularly useful and can be eliminated. For example you can average across the two time points per subject and perform a two sample t-test, or perform a one-sample test on the difference.




Best wishes,
Andrew
  
Originally posted by Álvaro Deleglise:
Hi again Andrew,

I didn't get any rank deficiency warning using the design matrix I attached to you in the last message, so I assume it's ok. However, I will follow your advice and remove the task column and assess the task effect in a separate model by using the averaged data of each subject for the two time points. Hope it work. As you said, the two different tasks (MSL and CTL in the attached file) are the same in the two time points.
By the other hand, given that you didn't mention anything regarding the contrasts and the exchange blocks vectors, I assume they are ok.

Thanks you very much for your time and help!

A. D.

Threaded View

TitleAuthorDate
Álvaro Deleglise Feb 17, 2021
Andrew Zalesky Feb 20, 2021
Álvaro Deleglise Feb 25, 2021
Andrew Zalesky Feb 27, 2021
Álvaro Deleglise Mar 1, 2021
RE: Within-subjects design longitudinal analysis with three time points.
Andrew Zalesky Mar 2, 2021