See inline responses below.
On Wed, Oct 10, 2012 at 1:46 PM, Kwaku Akrofi <[log in to unmask]> wrote:
> Hello SPMers,
>
> How do I compute the contrasts to implement a 1-sample and a 2-sample test in SPM?
There is no such thing as a 1-sample and 2-sample test in an ANOVA. A
1-sample t-test only has one column in its design matrix, plus
covariates. The 2-sample t-test has two columns, plus covariates.
Neither of them deal with repeated measures. For either of these
tests, use the one- or two-sample t-test option from the GUI when
building your design.
>
> I have set up a 3-by-2 Flexible Factorial ANOVA in SPM8. For each subject, I have 2 contrast images, one for each condition, for the ANOVA. I used the paper by Glascher and Gitelman (http://www.sbirc.ed.ac.uk/cyril/downloads/Contrast_Weighting_Glascher_Gitelman_2008.pdf) as a guide to set up the ANOVA.
>
> Factors were set up as follows:
> Factor 1: subject independence – yes, variance – equal
> Factor 2: group independence – yes, variance – unequal
> Factor 3: condition independence – no, variance – equal
You should also specify that the model includes Subject as well.
>
> F-Contrasts were set up as follows:
>
> n1 = 12; (number of subjects in group 1)
> n2 = 10; (number of subjects in group 2)
> n3 = 7; (number of subjects in group 3)
> nc = 2; (number of levels in condition factor)
> ng = 3; (number of groups)
> MEg = [1:nc]-mean(1:nc); (main effect of group, here: [-1 0 1])
> MEc = [1 -1]; (main effect of group: Condition 1 > Condition 2)
> Main effect of Group:
> MEg zeros(1,nc) -ones(1,nc)/nc zeros(1,nc) ones(1,nc)/nc -ones(1,n1)/n1 zeros(1,n2) -ones(1,n3)/n3
> Main effect of Condition:
> zeros(1,ng) MEc MEc*[n1/(n1+n2+n3)] MEc*[n2/(n1+n2+n3)] MEc*[n3/(n1+n2+n3)] zeros(1,n1+n2+n3)
> Group-condition interaction;
> zeros(1,ng) zeros(1,nc) -MEc zeros(1,nc) MEc zeros(1,n1+n2+n3)
>
> Note that unlike in SPM5, the design matrix SPM8 positions the subject factor after the group factor, condition factor, and interactions.
>
> Using the above setup, I have results for the main effects and interactions of my study, and am satisfied with the results.
The main effect of group, along with any comparisons of group are NOT
valid. The interaction terms are valid though.
>
> But I would like to use 1- and 2-sample t-tests post hoc to further examine the relationships between groups and conditions. I have used the built-in options in SPM8 for these t-tests, but I have been informed that t-test within the Flexible Factorial framework lead to better results because variances are pooled from all groups in the study. I tried a 1-sample t-test the following way- to test for Condition 1 > Condition 2 in Group 1 - and got an error:
> 1 0 0 MEc*[1/nc] MEc*[1/nc] zeros(1,nc) zeros(1,nc) ones(1,n1) zeros (1,n1) zeros(1,n1). What would be the correct contrast for such a 1-sample t-test?
I wouldn't call these 1- and 2-sample t-tests as they are not. I would
simple call them post-hoc contrasts.
To compare the two groups for condition1>condition2
0 0 0 1 -1 1 -1 0 0 0 0 zeros(1,n1+n2+n3)
I would take a look at my previous posts for how to construct any contrast.
>
> Any help is greatly appreciated. Thank you very much in advance!
>
> Kwaku Akrofi, PhD
> Postdoctoral Fellow
> Department of Speech and Hearing Science
> University of Illinois at Urbana-Champaign
> [log in to unmask]
|