Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: 2 groups, 8 tasks, 2 dependent variables

5 views
Skip to first unread message
Message has been deleted

Ryan

unread,
Feb 6, 2010, 1:33:43 PM2/6/10
to
On Feb 5, 7:00 pm, Alex Trofimovsky <alex.t...@gmail.com> wrote:
> I'm trying to get SPSS to compare two groups of test participants
> (group A and group B) on eight different tasks (1, 2, 3, 4, A, B, C,
> and D) on two dependent variables (time on task and number of mouse
> clicks).
>
> Any suggestions?

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

Ryan

unread,
Feb 6, 2010, 1:38:20 PM2/6/10
to

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

Message has been deleted

Ryan

unread,
Feb 7, 2010, 7:42:33 PM2/7/10
to
Alex,

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

Message has been deleted

Ryan

unread,
Feb 10, 2010, 8:37:44 AM2/10/10
to
On Feb 8, 6:36 pm, Alex Trofimovsky <alex.t...@gmail.com> wrote:
> Ryan,
>
> Thanks again.
>
> I have a follow-up.  I ran an interaction type model, and I am
> wondering if is similar to what you have here.  Also, I am concerned
> that an "interaction" implies something like a co-variate/a variable
> working in the background.  I do not have anything in background, I
> have completely different tasks and groups.  So, is this syntax/model
> funny?
>
> DATASET ACTIVATE DataSet1.
> GLM Num_Clicks Time_on_Task BY Task_ID Group_ID
>   /METHOD=SSTYPE(3)
>   /INTERCEPT=INCLUDE
>   /PLOT=PROFILE(Task_ID*Group_ID)
>   /EMMEANS=TABLES(Group_ID*Task_ID)
>   /PRINT=DESCRIPTIVE ETASQ OPOWER HOMOGENEITY LOF
>   /PLOT=SPREADLEVEL RESIDUALS
>   /CRITERIA=ALPHA(.05)
>   /DESIGN=Group_ID*Task_ID.
>
> Thanks...
> - Alex- Hide quoted text -
>
> - Show quoted text -

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

Bruce Weaver

unread,
Feb 10, 2010, 8:18:00 PM2/10/10
to
Ryan wrote:

--- 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."

Message has been deleted
Message has been deleted

Bruce Weaver

unread,
Feb 11, 2010, 4:40:02 PM2/11/10
to
On Feb 11, 3:47 pm, Alex Trofimovsky <alex.t...@gmail.com> wrote:
> On Feb 11, 3:45 pm, Alex Trofimovsky <alex.t...@gmail.com> wrote:
> > > bwea...@lakeheadu.cahttp://sites.google.com/a/lakeheadu.ca/bweaver/

> > > "When all else fails, RTFM."
>
> > Hi Bruce,
>
> > Thanks for the input.
>
> > Do you have an updated link for that example?  The current link does
> > not work.
>
> > Thanks again.
>
> > - Alex
>
> > Alexander Trofimovsky, MA
> > Human-Computer Interaction Professional
> > Email/Gtalk: alex.t...@gmail.com
> > Google Voice: (347) 466-9866
> > Skype: atrofimovsky
>
> When you click on the above link it turns into:http://www.google.com/www.angelfire.com/wv/bwhomedir/spss/repmeas_ANO...
> , which does not work... Google's fault.  So the link that should work
> is:http://www.angelfire.com/wv/bwhomedir/spss/repmeas_ANOVA_with_long_fi...

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

0 new messages