Hello,
Has anyone anything to advise on this? I've looked at it as well and
can't seem to figure out how to go about it... I have no problem when
the 2 factors have 2 levels each, but not when a factor has 4 levels...
Best,
Stéphane
Stéphane Jacobs - Chercheur post-doctorant / Post-doctoral researcher
Espace et Action - Inserm U864
16 avenue du Doyen Lépine
69676 Bron Cedex, France
Téléphone / Phone: (+33) (0)4-72-91-34-33
Kristen Macuga a écrit :
> Hi,
>
> I'd like to run a 2x4 repeated measures ANOVA and test specific contrasts within this
> design, but I can't seem to find any examples of how to code 2 factors when one has >2
> levels or of repeated measures designs with >1 factor.
>
> Here are the details of my design:
> -Both factors are repeated measures, such that every subject performs every condition.
> In other words, Factor A has 2 levels and Factor B has 4 levels, so each subject performs
> A1B1 A1B2 A1B3 A1B4 A2B1 A2B2 A2B3 A2B4.
> -Each subject does 4 runs, though all conditions are included in each run.
> I also have a rest condition that follows each of the experimental conditions.
>
> Here is how I've set up my analysis:
> 1) At the 1st level, for each run, I am contrasting each condition vs. the rest condition,
> which gives me 8 copes.
> 2) At the 2nd level, for each subject, I combine these 8 copes across the 4 runs.
>
> Then, here are the 3rd level analyses that seem to make sense to me, though I'm new at
> this.
>
> 3A) Set up the design matrix with an EV for each of the 8 conditions + EVs for each
> subject. Here is an example with only 2 subjects included for simplicity:
> 1 0 0 0 0 0 0 0 1 0
> 0 1 0 0 0 0 0 0 1 0
> 0 0 1 0 0 0 0 0 1 0
> 0 0 0 1 0 0 0 0 1 0
> 0 0 0 0 1 0 0 0 1 0
> 0 0 0 0 0 1 0 0 1 0
> 0 0 0 0 0 0 1 0 1 0
> 0 0 0 0 0 0 0 1 1 0
> 1 0 0 0 0 0 0 0 0 1
> 0 1 0 0 0 0 0 0 0 1
> 0 0 1 0 0 0 0 0 0 1
> 0 0 0 1 0 0 0 0 0 1
> 0 0 0 0 1 0 0 0 0 1
> 0 0 0 0 0 1 0 0 0 1
> 0 0 0 0 0 0 1 0 0 1
> 0 0 0 0 0 0 0 1 0 1
> and some example contrasts:
> A1-A2 1 1 1 1 -1 -1 -1 -1 0 0
> B1-rest 1 0 0 0 1 0 0 0 0 0
> B2-B1 -1 1 0 0 -1 1 0 0 0 0
>
> and the 3 F-tests:
> A1-2 1 1 1 1 -1 -1 -1 -1 0 0
> B1-4 3 -1 -1 -1 3 -1 -1 -1 0 0
> B2-4 -1 3 -1 -1 -1 3 -1 -1 0 0
> B3-4 -1 -1 3 -1 -1 -1 3 -1 0 0
> A1-2*B1-4 3 -1 -1 -1 -3 1 1 1 0 0
> A1-2*B2-4 -1 3 -1 -1 1 -3 1 1 0 0
> A1-2*B3-4 -1 -1 3 -1 1 1 -3 1 0 0
> When I run it this way, I get a rank deficient/singular matrix error. It runs fine without
> the subject EVs included, but then I'm not able to remove the subject mean variability
> from the residuals. Should I perhaps be doing this at the 1st level instead and then using
> the multi-session, multi-subject example to average across runs and subjects? If so, how
> can I contrast each condition vs. rest beforehand, and still do this?
>
> 3B) I also attempted to code it with 7 predictors instead. Here is the design matrix that I
> generated for testing individual contrasts with the following coding scheme (following
> your tripled two-group difference example):
> A1B1 = a + b + c + d + e + f + g
> A1B2 = -a
> A1B3 = -b
> A1B4 = -c
> A2B1 = -d
> A2B2 = -e
> A2B3 = -f
> A2B4 = -g
> 1 1 1 1 1 1 1
> -1 0 0 0 0 0 0
> 0 -1 0 0 0 0 0
> 0 0 -1 0 0 0 0
> 0 0 0 -1 0 0 0
> 0 0 0 0 -1 0 0
> 0 0 0 0 0 -1 0
> 0 0 0 0 0 0 -1
> and some example contrasts:
> A1-A2 0 0 0 2 2 2 2
> A2-A1 0 0 0 -2 -2 -2 -2
> B1-0 1 1 1 0 1 1 1
> B2-0 -1 0 0 0 -1 0 0
> B2-B1 -2 -1 -1 -2 -2 -1 -1
> B4-B3 0 1 -1 0 0 1 -1
> B2-B4 -1 0 1 0 -1 0 1
> and the design matrix I created for the F-test (1st column codes A, 2nd-4th columns code
> B, and 5-7th columns code interactions)
> (roughly following the ANOVA: 1-factor 4-levels (Repeated Measures) example):
> 1 -1 -1 -1 -1 -1 -1
> 1 1 0 0 1 0 0
> 1 0 1 0 0 1 0
> 1 0 0 1 0 0 1
> -1 -1 -1 -1 1 1 1
> -1 1 0 0 -1 0 0
> -1 0 1 0 0 -1 0
> -1 0 0 1 0 0 -1
> along with the F-test matrix:
> A1-2 1 0 0 0 0 0 0
> B2-1 0 1 0 0 0 0 0
> B3-1 0 0 1 0 0 0 0
> B4-1 0 0 0 1 0 0 0
> A1-2*B2-1 0 0 0 0 1 0 0
> A1-2*B3-1 0 0 0 0 0 1 0
> A1-2*B4-1 0 0 0 0 0 0 1
> For all of these, I also have N additional columns (one for each subject) in order to
> remove the subject mean variability.
>
> Any advice or comments would be greatly appreciated.
> Thanks!
> Kristen
>
>
>
|