Fan,

You can treat your 2 conditions as separate groups for the purpose of this analysis. Each group is a condition and you can repeat your covariate and interaction it with group. 

The contrast [0 0 1 -1] will test if condition 1 slope is greater than condition 2 slope.

Including the same subjects twice without accounting for the repeated observations is generally not advised, but this is a special case where it is not needed.

Best Regards, 
Donald McLaren, PhD


On Thu, Dec 15, 2016 at 10:32 AM, Fan Cao <[log in to unmask]> wrote:
Hi Colin,
Thanks for your reply, but I do not want to compare the slope of two covariates, I want to compare the slope of the same covariate on different conditions. For example, I want to compare whether working memory has a bigger influence on language learning than math learning in the same group of subjects. Hope I made it clear. Thanks.
Fan

On Thu, Dec 15, 2016 at 1:09 PM, Colin Hawco <[log in to unmask]> wrote:

I did not know that option existed n the two-sample dialog (I generally direct call SPM functions using scripts. Neato!

 

If I understand what you want to do at to compare covariates within the same subjects, this is how you do it:

 

As a second level analysis, use a one-sample t-test. Add two covariates. This should produce a design matrix with three columns. Contrast 0 1 -1. This will test if there is a difference for the slope for covariates 1 and 2.

 

Interpreting such a difference is another matter!

 

Best of luck,

 

Colin Hawco, PhD

Neuranalysis Consulting

Neuroimaging analysis and consultation

www.neuranalysis.com

[log in to unmask]

 

 

 

From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On Behalf Of Fan Cao
Sent: December-15-16 10:55 AM
To: [log in to unmask]
Subject: Re: [SPM] how to compare correlations in SPM

 

Thank you, Colin and Guillaume for your help. I have successfully figured out the two-sample situation, however when the design is within-subject, I still have some trouble. Say if I want to compare the correlation on two conditions in the same subjects, I haven't gotten the right matrix set up. :(

Fan

 

On Thu, Dec 15, 2016 at 7:31 AM, Guillaume Flandin <[log in to unmask]> wrote:

Dear Fan,

What Colin is describing can be defined using an SPM's two-sample t-test
model where you add one covariate and select "interaction with factor
1". You would then test for a group by skill interaction with a contrast
[0 0 1 -1]. For the centering options, have a look at this summary from
Jeanette Mumford:
  http://mumford.fmripower.org/mean_centering/

Best regards,
Guillaume.


On 14/12/16 20:03, Colin Hawco wrote:
> Use a multiple regression to enter your behavioral covariates. Then,
> contrast (1 -1) the columns in the design matrix related to those
> covariates.
>
>
>
> For comparing between groups, mean center the variable across all
> subjects. They split it into two columns, one for each group, with zeros
> for other groups in those columns. Again, do a 1 -1 contrast. This tests
> if the slope of the regression of the variable on the contrast map is
> the same in each group.
>
>
>
> Good luck,
>
>
>
> Colin Hawco, PhD
>
> Neuranalysis Consulting
>
> Neuroimaging analysis and consultation
>
> www.neuranalysis.com <http://www.neuranalysis.com>
>
> [log in to unmask]
>
>
>
>
>
>
>
> *From:*SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]]
> *On Behalf Of *Fan Cao
> *Sent:* December-14-16 11:16 AM
> *To:* [log in to unmask]
> *Subject:* [SPM] how to compare correlations in SPM

>
>
>
> Dear SPM experts,
>
>
>
> I want to find out which part of the brain activation is more correlated
> with a behavioral skill in group A than group B.
>
> I also want to find out which part of the brain activation is more
> correlated with a skill in task A than task B for the same subjects.
>
> Currently I don't know any method to run these comparisons in SPM. Any
> suggestions or ideas from this group of experts? Thanks so much!
>
>
>
> Best,
>
> Fan
>

--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG