JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for SPM Archives


SPM Archives

SPM Archives


SPM@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

SPM Home

SPM Home

SPM  December 2007

SPM December 2007

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: questions on perfroming 2 x 2 within-subjects ANOVA in SPM5

From:

Matt Johnson <[log in to unmask]>

Reply-To:

Matt Johnson <[log in to unmask]>

Date:

Mon, 24 Dec 2007 06:56:21 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (242 lines)

Hi all,

Matt Shane and I have been corresponding a bit about this off-list and,
thanks to this dialogue and Will's elucidation, I now realize that I (and
apparently others, from the looks of the archives) had been making some
improper assumptions about within-subjects or mixed designs in SPM5.

Previously, SPM5's removal of the "ANOVA (within-subjects)" option and the
addition of the independent/dependent distinction for design factors (as
well as the help blurb noting: "If you change this option to allow for
dependencies, this will violate the assumption of sphericity. It would
therefore be an example of non-sphericity. One such example would be where
you had repeated measurements from the same subjects - it may then be the
case that, over subjects, measure 1 is correlated to measure 2") had caused
me to assume that simply selecting "dependent" was sufficient to create a
within-subjects design, and some sort of lovely SPM5 magic took the place of
all those messy individual-subject columns a la SPM2.

Clearly it is time for me to learn what happens when you assume.

At any rate, if you please, just a quick clarification to make sure I and
any similarly confused individuals are on the right page. My understanding
now is that simply selecting "dependent" for a within-subjects factor (and
not explicitly modeling subject effects) is not "wrong" in the sense of
producing false inferences, but it fails to give the benefit of added power
that one expects to get from modeling subject effects and thus removing them
from the error term? I.e., by only selecting "dependent," you are
essentially still running a between-subjects ANOVA but (at least) managing
to avoid the sin of ignoring a sphericity violation where one probably occurs?

Thanks, and happy holidays to all,

Matt Johnson

On Fri, 21 Dec 2007 17:44:56 +0000, Matthew Shane <[log in to unmask]> wrote:

>Thank you Will,
>
>I've tried removing the Group and TrialType variables from the design
>matrix(while keeping them as factors in the model). 
>
>Unfortunately, I'm still coming up against the same (fairly unusual)
>problem: the contrast manager continues to tell me that contrasts utilizing
>any columns other than the 30 Subject columns are invalid. Moreover, the
>contrast manager won't allow me to define a single 1 0 0 0... contrast, but
>rather requires the associated -1 to define it as valid. 
>
>Has anyone else encountered this problem with the flexible-factorial design?
>I've never had my contrast manager act this way before, and so I'm pretty
>sure it's design-specific and not a local problem.
>
>I don't believe my .mat file was properly uploaded last time. I'll attach
>again, this time as a .mtt file (which will need to be renamed .mat again
>upon download). Is there a better way for me to design this model?
>
>Thanks again,
>Matt
>
>On Fri, 21 Dec 2007 12:11:05 +0000, Will Penny <[log in to unmask]>
wrote:
>
>>Dear Matt,
>>
>>I would remove the 'group variables' and the 'trial type
>>variables'.
>>
>>You can still test for the effect of 'group' using the appropriate contrast.
>>
>>For example:
>>
>>(1) The contrast vector c=[ones(1,10),zeros(1,20)] will test for the
>>effect of group 1 (t-test for positive effect, F-test for any effect).
>>
>>(2) The contrast matrix C=[ones(1,10),-ones(1,10),zeros(1,10);
>>zeros(1,10);ones(1,10),-ones(1,10)] will test for a main effect of
>>group. You'll need the F-test here.
>>
>>You can also test for the main effect of trial type by using a contrast
>>that collapses over the relevant columns of the 'group x trial type
>>interaction' variables.
>>
>>The main concept here is that if you've got the 'interaction terms' in
>>your design matrix you can test for the main effects using an
>>appropriate contrast.
>>
>>Best wishes,
>>
>>Will.
>>
>>
>>Matt Shane wrote:
>>> Dear Will (or anyone else who can help),
>>>
>>> Your reply to Michiru was very timely for me, and I have just attempted
>>> to undertake an analysis guided by your steps below. I feel like the
>>> design matrix is correct, but unfortunately the contrast manager doesn't
>>> appear to be appreciating the design I've created. And so I'm thinking
>>> that I might have gone astray from your advice in some manner.
>>>
>>> In short: I have 30 participants in a 3 (Group) x 3 (TrialType)
>>> mixed-model design. I've thus created 3 factors in the
>>> flexible-factorial model: Subject, Group and TrialType. The design
>>> matrix (which I'm attaching to this post) appears (to me) to be right: I
>>> have 30 subject columns, followed by the three group columns, followed
>>> by the three trial-type columns, and finally the group x trial type
>>> interactions.
>>>
>>> My problem arises when I try to create contrasts in the contrast
>>> manager, however: I'm able to create contrasts with the first 30
>>> 'subject' columns, but I'm told that any contrast utilizing the 'group'
>>> or 'trial type' columns is invalid. Which, obviously, is problematic
>>> since it's the group and trial type that I want to interrogate!
>>>
>>> Does anyone have any advice? Have I set up my matrix incorrectly? I'm
>>> attaching both the matrix and the .mat file, and would be ever thankful
>>> for anyone willing to take the time to look it over.
>>>
>>> Thanks,
>>> Matt
>>>
>>> __________________________
>>> Matthew S. Shane, Ph.D.
>>> Research Scientist
>>> The MIND Institute
>>> 1101 Yale Blvd NE
>>> Albuquerque, NM, 87131
>>> (505) 272-4374
>>> [log in to unmask]
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: SPM (Statistical Parametric Mapping) on behalf of Will Penny
>>> Sent: Thu 12/20/2007 9:20 AM
>>> To: [log in to unmask]
>>> Subject: Re: [SPM] questions on perfroming 2 x 2 within-subjects ANOVA
>>> in SPM5
>>>
>>> Dear Michiru,
>>>
>>> This is most easily done using the 'Flexible Factorial'
>>> option.
>>>
>>> 1. Create two factors.
>>>
>>> 2. Call the the first one Subject. Independence Yes, Variance Equal.
>>>
>>> 3. Call the second one 'Condition'. Independence Yes, Variance Unequal.
>>>
>>> 4. Under, Specify Subjects or all Scans, Choose Subjects
>>>
>>> 5. Under Subjects, create a new 'Subject' for each subject that you have
>>> eg. 5.
>>>
>>> 6. Then, for each Subject, under 'Scans'. Enter the 4 scans you have for
>>> each subject.
>>>
>>> 7. Also, for each Subject, under 'Conditions' enter the vector [1:4]
>>>
>>> 8. Under Main effects and Interactions create 2 main effects; factor 1
>>> and factor 2.
>>>
>>> 9. Specify other covariates as necessary and your o/p directory.
>>>
>>> 10. Then save your design job as 'within_subject_design' and press run.
>>>
>>> I have attached my saved job file 'within_subject_design.mat' as a
>>> template for you. When you run it, SPM should create the design matrix
>>> shown in 'design-matrix.png'.
>>>
>>> Note the 5 subject columns on the left. Without these 5 columns
>>> you do not have a 'within-subject' design.
>>>
>>> Also I have treated your 2 x 2 design as a 1 x 4. So you'll need to bear
>>> this in mind when doing your contrasts eg. 1 1 -1 -1 and 1 -1 1 -1 to
>>> test for main effects and 1 -1 -1 1 for the interaction (of course,
>>> pre-pad these with 5 0's).
>>>
>>> Best wishes,
>>>
>>> Will.
>>> Michiru Makuuchi wrote:
>>>  > Hi,
>>>  >
>>>  >
>>>  > I have tired to perfrom 2 x 2 within-subjects ANOVA in SPM5, but I
>>>  > couldn't find
>>>  > how I could do that in 'Full factorial' dsign. Therefore I designed the
>>>  > design matrix
>>>  > via 'Multiple regression' option. The resulted design matrix was similar
>>>  > to Fig 7 of
>>>  > Henson and Penny's online document (ANOVA and SPM). The difference was
>>>  > only the position
>>>  > of constant term. In Fig 7, it was the 4th column, but it was on the
>>>  > last column in my design matirix.
>>>  >
>>>  > Here are my questions.
>>>  > Is my approach acceptible for the purpose?
>>>  > Can someone point out the exact procedure to build the model for 2 x 2
>>>  > within-subject ANOVA?
>>>  >
>>>  >
>>>  > Best regards,
>>>  >
>>>  > Michiru
>>>  >
>>>  > Michiru Makuuchi
>>>  > Max Planck Institute
>>>  > for Human Cognitive and Brain Sciences
>>>  > Stephanstrasse 1a, 04103 Leipzig, Germany
>>>  >
>>>  >
>>>
>>> --
>>> William D. Penny
>>> Wellcome Trust Centre for Neuroimaging
>>> University College London
>>> 12 Queen Square
>>> London WC1N 3BG
>>>
>>> Tel: 020 7833 7475
>>> FAX: 020 7813 1420
>>> Email: [log in to unmask]
>>> URL: http://www.fil.ion.ucl.ac.uk/~wpenny/
>>>
>>>
>>
>>--
>>William D. Penny
>>Wellcome Trust Centre for Neuroimaging
>>University College London
>>12 Queen Square
>>London WC1N 3BG
>>
>>Tel: 020 7833 7475
>>FAX: 020 7813 1420
>>Email: [log in to unmask]
>>URL: http://www.fil.ion.ucl.ac.uk/~wpenny/
>>=========================================================================
>
>

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager