HI Noelia,

Those are all fine as they are group*time interactions.

It's only the effect of group that isn't valid.

Best Regards, 
Donald McLaren, PhD


On Mon, Jun 11, 2018 at 6:06 AM, Noelia Martinez-Molina <[log in to unmask]> wrote:
Hi Donald,

Thank you for clarifying that in the pooled model SPM only provides the within-subject error term. I was then hoping to set up a partitioned error model using a flexible factorial design. As a reminder, I´m running a longitudinal VBM analysis with 2 groups (A, B) and 3 time points (1,2,3) and would like to test for the following interactions:

(A>B)x(1>2)
(A>B)x(2>3)
(A>B)x(1>3)

However, in VBM there is no first level and I would appreciate if you could provide some help about how to set the differential contrasts and then the flexible factorial (including the contrast matrix) to test for the effect of the aforementioned interactions. 
 
All the best,
Noelia



2018-06-08 17:18 GMT+03:00 MCLAREN, Donald <[log in to unmask]>:
Hi Noelia,

The main effect of group is an invalid contrast in a repeated measures ANOVA using a GLM, even if you didn't get the error message. The reason is the error term for this model is the within-subject error term not the between-subject error.

For the main effect of group, you want to use a two sample t-test of the average of the two visits.

Also, covariates are not valid in a repeated-measures ANOVA. If you want to use covariates, you need a mixed effects model.


Best Regards, 
Donald McLaren, PhD


On Fri, Jun 8, 2018 at 8:21 AM, Noelia Martinez Molina <[log in to unmask]om> wrote:
Dear SPM experts,

I already run a flexible factorial design with 2 groups (n1=17, n2=12) and 2 within-subject conditions. This is a VBM longitudinal analysis and here are the factors:
Factor 1: Subject
Factor 2: Group (2 Levels)
Factor 3: Time (2 Levels)
Covariate1: age
Covariate2: total intracranial volume

I set up the following contrasts:

F tests:

Time differences in Group1: 1 -1 0 0
Time differences in Group2: 0 0 1 -1
Main Effect Time: 1 -1 1 -1
Main Effect Group: ones(1,2)/2 -ones(1,2)/2 0 0 ones(1,17)/17-ones(1,12)/12
Interaction Time by Group: 1 -1 -1 1   

I think all of these should be correct but when I entered the contrasts weights for Main Effect of Group, I got the "Invalid contrast" error.

Could anyone explain me why this is happening and what would be the correct contrast weights matrix for this, please?

Thank you in advance for your help.

Best,
Noelia




--
 
*****************************************************
Noelia Martínez Molina, PhD
Postdoctoral Researcher
Cognitive Brain Research Unit (CBRU)
Department of Psychology and Logopedics
Faculty of Medicine
University of Helsinki
Phone1: +358 50 31 88 048 (Finnish)
Phone2: +34 620 15 23 87 (Spanish)

-------------------------------------------------------------
"Where words fail, music speaks".
                                             H.C. Andersen
******************************************************