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  September 2007

SPM September 2007

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Mixed-model ANOVA

From:

Ged Ridgway <[log in to unmask]>

Reply-To:

Ged Ridgway <[log in to unmask]>

Date:

Fri, 14 Sep 2007 13:17:24 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (138 lines)

Hi Nick,

> As you can see,

Unfortunately, I can't! I guess the mailing list stripped the 
attachment as being too large? If you could put it somewhere on the 
web that would be cool. If not, I'd be happy to take a look if you 
email it directly to me. I'll have a bit of a guess anyway...

> I've specified a main effect for subject, producing the 
> 19, staggered, step-like columns. After these, there are four columns 
> (the modeled interaction). The first two columns refer to the first 
> level of the between-subjects effect. The last two columns refer to the 
> second level of the between-subjects effect. Columns 1 and 3 refer to 
> the first level of the within-subjects effect; Columns 2 and 4 refer to 
> the second level of the within-subjects effect.

If I've understood this correctly, the last four columns are then:
   A1 A2 B1 B2
where A/B is a between-subjects factor (like group maybe), and 1/2 is 
a within-subjects factor (perhaps like time).

Following the post I've just sent to Fatima, are your subjects nested 
inside your between subjects factor? e.g. do you have group 1 with 
subjects 1-10 and group 2 with subjects 11-19? If so, then I don't 
think you can test the main effect of group, since the different 
subjects already model the group difference.

> I can test both of the interaction's contrasts:
> [1 -1 -1 1]
> [-1 1 1 -1]

Fatima, if you're reading, I guess you could probably create a similar 
design matrix, and use the same contrast for your interaction. 
Possibly, Nick, you just modelled the interaction of your two factors, 
and no main effect for either, right? This probably makes the design 
matrix simpler to interpret than if you have both, though it partly 
depends on how SPM decides to treat things, and I haven't checked this 
myself. I would guess the two of you may be able to help each other 
here more than I can help either of you...

> I can NOT test either of the between-subjects contratsts:
> [1 1 -1 -1]
> [-1 -1 1 1]

I think this makes sense. The within-subjects factor and its 
interaction with the between-subjects one are the main things to ask 
about. (Though see my more speculative bit later on...)

If you're interested in the algebra as to why SPM is complaining. It's 
that a contrast must be in the row-space of the design matrix in order 
to be estimable. A single subject has rows like the following in your 
design matrix (if I've interpreted it correctly), e.g. for the third 
of 19 subjects, in group 1:
   0 0 1 zeros(1,16)  1  0  0  0
   0 0 1 zeros(1,16)  0  1  0  0
and for the 19th subject, in group 2:
   zeros(1,18) 1      0  0  1  0
   zeros(1,18) 1      0  0  0  1
now, you can build e.g.
   zeros(1,19)       -1  1 -1  1
as follows: first subtract the first row from the second for a group1 
subject to get:
   zeros(1,19)       -1  1  0  0
then subtract the first row from the second for a group2 subject for:
   zeros(1,19)        0  0 -1  1
noting that all the ones in the first 19 (subject) columns have 
cancelled. Now, you simply add these results (rather like averaging 
the within-subject effects over the groups/subjects). Similarly, you 
could subtract them to get the interaction that you found was valid.

However, if you instead add the two rows for the within-subjects 
levels, you'd get (for the two subjects considered above):
   0 0 2 zeros(1,16)  1 1 0 0
   zeros(1,18) 2      0 0 1 1
then if you tried to subtract the first from the second to get [-1 -1 
1 1] contrast, you'd instead end up with:
   0 0 -2 zeros(1,15) 2 -1 -1 1 1
since the subject effects won't cancel in this case.

Okay, hopefully that's reasonably clear, and also something I'm 
reasonably confident of. Now for something I'm not...

I think the above logic shows that a contrast like:
  -ones(1,10)/10 ones(1,9)/9 -1/2 -1/2 1/2 1/2
would be estimable (here assuming 10 subjects in group1 and 9 in 
group2, but easily altered).

Possibly, such a contrast might be a sensible way of testing the main 
"group effect", since it's averaging over the subjects in each group, 
which perhaps gets around my point that you can't separate the group 
effect if your different subjects already allow you to model a group 
difference... I'm afraid though, I'm really out of my depth here... 
I'm not sure if the above is sensible. Perhaps a statistician can help 
here? (note that this is an entirely general non-imaging-specific GLM 
question, in my opinion). Also, maybe you could take a look at this 
for your data, and see if it appears to be, first, a valid contrast, 
and second, give reasonable results? Do please mail the list (and 
maybe CC me) if you find anything.

> Markus Lonsdale also posted recently with a similar problem in a PET 
> study, I've copied his post below (sorry I couldn't figure out how to 
> paste the URL without it going through my username):

For future reference, I think you can just delete the bit of the URL 
that says something like: &Y=drc.spm%40googlemail.com but for your 
email address. In fact, you can delete all the &something=something 
bits except for &L=spm&P=posting_number

> we try to analyse a PET study with 2 groups of subjects in 2
> conditions. The idea is to look at group differences in each condition
> as well as in the response to the conditions.
> 
> We have tried to model this as flexible factorial, 2 factors
> (subjects, conditions), 2 main effects (subjects, conditions) with an
> interaction between the two. (The idea is to define a contrast where
> we can "pick out" the subjects according to their group.)
> 
> However, no contrasts are accepted by the contrast manager, not even
> the simple contrast "condition1 - condition2"!?!

I think I'd have to see the design matrix for this, I'm afraid. I 
would certainly expect *some* contrasts to be estimable! I think 
perhaps it is enough just to model the interaction, and not the main 
effects, because of the way SPM uses a column for each level of a 
factor. (note that if you have a mean column, and/or a bunch of 
subject columns, there is a redundancy if you then have a column for 
each level of a factor, since one of the level's columns would then be 
equivalent to the mean minus the other levels' columns. Possibly 
Markus' problem is that these redundancies multiply up with the two 
main effects and interaction, to give a heavily redundant design 
matrix, with confusing contrasts; your design matrix is still 
rank-deficient (otherwise all contrasts would be estimable), but much 
less so)

I hope at least some of the above is useful...

Ged.

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

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


WWW.JISCMAIL.AC.UK

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