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  May 2017

SPM May 2017

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: 3 by 6 flexible factorial design contrast

From:

Martyn McFarquhar <[log in to unmask]>

Reply-To:

Martyn McFarquhar <[log in to unmask]>

Date:

Tue, 30 May 2017 10:32:02 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (44 lines)

Hi May,

Firstly, I am assuming that this is a repeated measures design, with one between-subject factor (group) and one within-subject factor (condition)? If not, there's little reason to use the flexible factorial over the full factorial. If so, your design matrix must also include subject as a factor. Your columns should be:

G1 G2 G3 C1 C2 C3 C4 C5 C6 G1C1 G1C2 G1C3 ... etc. ... S1 S2 S3 S4 S5 S6 ... etc.

This is essential for a repeated measures design. Another aspect to understand is that the most basic repeated-measures designs contain 2 error terms: the between-subject and the within-subject. Unfortunately, SPM isn't designed to work very easily with mixed-effects models at the group level. This means you have to specify multiple models in order to force the correct error term for your effects of interest.

For the main effect of group, you shouldn't be testing it in the full model because SPM will use the within-subject variance for the denominator of the test statistics. What you need to do is use imCalc to average over all 6 conditions for each subject. You will then have one image per subject, which you can put into a standard one-way ANOVA model to assess the main effect of group.

For the main effect of condition you can test this in the full model, but what you need to understand is that you are now working with an overparameterised design. In this situation, contrasts must adhere to being estimable functions of the model. You can read more about it here (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4911391/) but the short version is that contrasts must be defined in terms of linear combinations of the rows of the design matrix, otherwise the contrast will be invalid. However, remember that being estimable doesn't protect you from getting the contrast wrong.

The contrast you have given appears to be testing for a linear effect of condition. Is this correct? You refer to it as a Main Effect, but in my mind this means comparing each condition to every other condition e.g. diff(eye(6)). If so, the approach you have taken seems fine, but you must make sure that you are averaging over all the interaction terms here. The paper you cite uses only two groups with a contrast of

[zeros(1,n1+n2) zeros(1,ng) MEc MEc*[n1/(n1+n2)] MEc*[n2/(n1+n2)]

where the first chunk of zeros refer to the subject effects, which Glascher & Gitelman put at the beginning of the design matrix. If you put subjects at the end, you just need to rearrange the order of this expression. For your design, you will need to adjust this to

[zeros(1,n1+n2+n3) zeros(1,ng) MEc MEc*[n1/(n1+n2+n3)] MEc*[n2/(n1+n2+n3)]  MEc*[n3/(n1+n2+n3)]]

As for the interaction term, you will need a contrast with 2 rows to test whether the linear effect of condition differs between groups 1 and 2, AND whether the linear effect of condition differs between groups 2 and 3. As such, you will need

[zeros(1,n1+n2+n3) zeros(1,ng) zeros(1,nc) MEc - MEc zeros(1,nc); 
 zeros(1,n1+n2+n3) zeros(1,ng) zeros(1,nc) zeros(1,nc) MEc - MEc]

All that being said, the SPM flexible factorial approach is probably the most difficult way to run repeated-measures models. If you want to try some easier alternatives, have a look here: http://www.sciencedirect.com/science/article/pii/S1053811916001622

Hope that helps

Best wishes
Martyn
 
-------------------------------------------------
Martyn McFarquhar, PhD
Lecturer in Neuroimaging
G30 Zochonis Building
The University of Manchester
Brunswick Street
Manchester
M13 9GB
 
+44 (0)161 306 0450
-------------------------------------------------

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

August 2019
July 2019
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