Caveat: I haven't set up PET models for awhile, so I'm not sure if there are subtle validity issues or not (e.g. with nonsphericity, population inference, etc). I'm only looking at the basic linear algebra here.
The basic rule of thumb is that you can form interactions by multiplying the column vectors component-wise. This ignores issues of redundancy (if you form all such products, your matrix will be overspecified) and mean correction.
From your last email it sounds like SPM will model the interaction of a condition and covariate (but not two conditions and a covariate, or at least it won't model the three-way interaction). A cheap way to deal with this would be to "combine" the two categorical variables (each with two levels) into one (with four levels). That should give you the right design: I imagine 4 cols for the combined categorical variable, one col for the covariate, four cols for the interaction of the cat var and the covariate, and one constant---it's overdetermined but SPM can cope with that, you just have to be careful with contrasts.
Some final comments:
* You should try to do it in one model not two if possible.
* In the presence of interactions with a covariate like age, some contrasts won't be well-defined.
* Sounds like you're not going to model the effect of subject; is that correct?
* Are the categorical variables within-subject or between-subject?
Best,
S
-----Original Message-----
From: Kristina Wikman [mailto:[log in to unmask]]
Sent: Thursday, June 30, 2011 9:41 AM
To: Fromm, Stephen (NIH/NIMH) [C]
Cc: [log in to unmask]
Subject: Re: Contrasts in spm2 for examining interactions
Thank you really much for your answer! I had suspicions with this
matrix, someone said that it would do the trick... I've now made new
ones. I didn't find any model in my version of spm where I could model
all interactions at the same time, do you know what this model would
look like? My categorical variables are both dichotomial, as you
thought. I did a matrix using one variable as condition and the other
two as covariates, and then I could model the interactions between the
condition and a covariate. This gives a matrix with seven columns (two
for the condition, then both covariates and both interactions, and
then a constant). So with two different matrices I should get all
interactions except for the one with all three variables... Does this
sound reasonable? How do I define the contrasts for this matrix?
Thank you again, and hopefully you can help me one more time!
Lainaus "Stephen J. Fromm" <[log in to unmask]>:
> Based on your description, I don't think you can model the
> interactions with that design matrix.
>
> The number of columns you need for the two categorical variables
> alone is the product of the number of levels in each (minus one if
> SPM automatically includes the constant regressor). If you also
> include a covariate like age, you need to multiply by an additional
> factor of two, if I recall correctly.
>
> The fact that your current design matrix (probably) models the main
> effects would indicate that your categorical variables each have two
> levels. If my claims above are correct, you'd need 2*2*2 = 8
> columns in the design matrix (if the constant isn't modeled).
>
>
>
|