Thanks very much Eugene and Steve for your previous replies
So just to check I have got this right, I have had a crack at an ANOVA with one between subject factor (3 levels) and one within subject factor (2 levels)
If someone could please have a look at my suggested Design Matrix I'd be very grateful
Here is my suggestion for a 6 subject experiment with 3 groups (between subject - in my case diagnosis) and one repeated measure at 2 levels (drug and placebo - everybody comes twice and on one scan they are given an active drug, the other scan they get placebo):
1 1 0 1 0 -1 0 0
1 -1 0 -1 0 -1 0 0
1 1 0 1 0 1 0 0
1 -1 0 -1 0 1 0 0
0 1 1 0 1 0 -1 0
0 -1 1 0 -1 0 -1 0
0 1 1 0 1 0 1 0
0 -1 1 0 -1 0 1 0
-1 1 -1 -1 -1 0 0 -1
-1 -1 -1 1 1 0 0 -1
-1 1 -1 -1 -1 0 0 1
-1 -1 -1 1 1 0 0 1
EV 1 gives Group 1>Group3
EV 2 gives Drug >Placebo
EV 3 gives Group 2>Group 3
EV 4 gives Group by Drug interaction part 1
EV 5 gives Group by Drug interaction part 2
EV 6 gives within subject variance between subject mean's, group 1
EV 7 gives within subject variance between subject mean's group 2
EV 8 gives within subject variance between subject mean's, group 3
F1: EV1 +1 and EV3 +1
F2: EV2 +1
F3: EV4 +1 and EV5 +1
so F1 is the group F
F2 is the drug (repeated measure) F
F3 is the drug by group interaction
Correct?
I hope so as I have, using this principle, made a DM for my actual experiment, which has over 50 subjects (approx. 18 subjects per group) : picture (design matrix png) attached in case anyone could take a look, thanks
***********************************
Your model can't fit each subject's mean as well as differences between groups of subjects - modelling each subject's mean separately already accounts for between-group differences. This is why you are rank deficient.
First model the various factors you are interested in. To model a factor with three levels you need two evs, in the same way as the four-level example needs three. Then to account for the subject effects model the overall mean and then the within sub-group differences between subject means, e.g. for 4 patients in diagnostic group A, model PA1-PA2, PA1-PA3, PA1-PA4. I think this will do it.
Eugene
|