Alex,
You haven't given us all that much information, but from what you've
stated I think one option would be to run two linear mixed models. I
am assuming that each participant was measured on each task and is
assigned to one group only? If I'm right so far, there is within-
subject correlation that should probably be taken into account, which
linear mixed models (and general linear models) can handle. In order
to run a linear mixed model, your data will have to be constructed in
"vertical" format:
Person Group Task Y_Time Y_Mouse
1 1 1 23 10
1 1 2 14 45
1 1 3 12 16
1 1 4 etc. etc.
1 1 5
1 1 6
1 1 7
1 1 8
2 2 1
.
.
N
With your data constructed as shown above, you can then run the
analysis in the MIXED procedure:
***************************.
MIXED Y_Time BY Group Task
/FIXED=Group Task Group*Task | SSTYPE(3)
/METHOD=REML
/PRINT=DESCRIPTIVES SOLUTION
/RANDOM=INTERCEPT | SUBJECT(ID) COVTYPE(VC).
MIXED Y_Mouse BY Group Task
/FIXED=Group Task Group*Task | SSTYPE(3)
/METHOD=REML
/PRINT=DESCRIPTIVES SOLUTION
/RANDOM=INTERCEPT | SUBJECT(ID) COVTYPE(VC).
***************************.
Both of these random intercept models assume that the within-subject
correlation of error terms is equal, which may be too restrictive.
Anyway, you'll need to add CONTRAST statements to test for simple main
effects (i.e. mean difference between groups for task 1, 2, 3,...,8).
It is also possible to incorporate both dependent variables into one
model, but I'm just not sure if that interests you. You could also
consider running an analysis of variance (ANOVA) with Group as a
between-subjects factor and Task as a within-subjects factor. I
haven't discussed assumptions to running linear mixed models and
general linear models, but they must be taken into consideration.
Feel free to write back if you think I've missed the boat and/or if
you have any follow-up questions. Others might have a different take
as well.
Ryan
Two small corrections:
(1) Change "ID" to "Person" in the MIXED code. I wrote "ID" out of
habit.
(2) To set up the contrast statements, you'll actually need to use "/
TEST..."
Ryan
Below are my responses to two of your follow-up questions.
Response to Fixed Effects Table in MIXED output:
You have two factors, one of which has two levels (A=Group) and the
other with eight levels (B=Task). Let's assume the first levels of
each factor are considered the reference categories (Google "Dummy
Coding" for more details). If we make lower case letters,
coefficients, and upper case letters, variables, then we have the
following fixed effects linear equation:
y = m
+ a2*A2
+ b2*B2 + b3*B3 + b4*B4 + b5*B5
+ b6*B6 + b7*B7 + b8*B8 + ab22*A2*B2
+ ab23*A2*B3 + ab24*A2*B4 + ab25*A2*B5
+ ab26*A2*B6 + ab27*A2*B7 + ab28*A2*B8
Notice that any term that includes a reference category is not
included in the equation (i.e. a1*A1). That's why estimates for
certain terms are not included in the Fixed Effects Estimates Table. I
think the MIXED procedure makes the last categories references for
factors. Apply the same logic if that's the case. The notation I used
above was recommended to me by a poster in another news group. I find
this notation to be very helpful, so I continue to borrow it. :)
------------------------------------------
Response to General Linear Model Question:
If you are interested in running general linear models instead of
linear mixed models, I suggest you restructure your data set such that
it is in "wide" format:
Person Group Task1Y1 Task1Y2 ... Task8Y2
1 1 23 12 22
2 2 33 15 21
3 1 10 19 10
.
.
.
N
If your data set is structured as above, then you can run a mixed
ANOVA for each dependent variable with the following code:
GLM Task1Y1 Task2Y1 Task3Y1 ... Task8Y1 BY Group
/WSFACTOR=Task 8 Polynomial
/METHOD=SSTYPE(3)
/PRINT=PARAMETER
/CRITERIA=ALPHA(.05)
/WSDESIGN=Task
/DESIGN=Group.
GLM Task1Y2 Task2Y2 Task3Y2 ... Task8Y2 BY Group
/WSFACTOR=Task 8 Polynomial
/METHOD=SSTYPE(3)
/PRINT=PARAMETER
/CRITERIA=ALPHA(.05)
/WSDESIGN=Task
/DESIGN=Group.
I refer to the ANOVA above as mixed since it includes both a between
subjects factor and a within subjects factor. This is not to be
confused with a linear mixed model. Again, let me know if you notice
an error or if you don't think I've understood the design.
Ryan
Alex,
Time is against me to respond fully, but based on the code it's clear
to me that your data set is still structured vertically. Why? Do you
have missing data? If you have missing data [at random] then you
really should consider running a linear mixed model. If you do not
have missing data, you're making this harder than it needs to be.
Simply restructure your data set into wide format as discussed
previously and run a mixed ANOVA. Bruce Weaver has shown that it is
possible to run an ANOVA when the data set is structured vertically,
but it gets tricky. If I recall correctly, I think you have to specify
the error terms and include the person effect. It's MUCH easier to
just run the ANOVA in wide format.
Ryan
--- snip ---
> Alex,
>
> Time is against me to respond fully, but based on the code it's clear
> to me that your data set is still structured vertically. Why? Do you
> have missing data? If you have missing data [at random] then you
> really should consider running a linear mixed model. If you do not
> have missing data, you're making this harder than it needs to be.
> Simply restructure your data set into wide format as discussed
> previously and run a mixed ANOVA. Bruce Weaver has shown that it is
> possible to run an ANOVA when the data set is structured vertically,
> but it gets tricky. If I recall correctly, I think you have to specify
> the error terms and include the person effect. It's MUCH easier to
> just run the ANOVA in wide format.
>
> Ryan
>
I think Ryan is referring to this example:
www.angelfire.com/wv/bwhomedir/spss/repmeas_ANOVA_with_long_file.SPS
IIRC, the MIXED procedure was not around yet when I did that, and
nowadays, I would probably use MIXED rather than UNIANOVA.
--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."
Right. Thanks for fixing it. I guess I should not remove the
"http://" when posting via Google Groups.
--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home