mixed models with repeated measurements

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

mixed models with repeated measurements

Ruben Real
Dear all,

I am trying to fit a mixed model to longitudinal data from a field
study. Over a course of 2 weeks patients were asked 3 times a day
(pseudo-randomly) to give subjective data (all likert-scales). Because
it is a repeated design, I would want to allow for correlated
residuals. Further, I would want to allow for heterogeneous variances,
because of possible situation specific factors affecting measurements.

 From how I understand the literature I thought of the following model
(SPSS-syntax):

MIXED
    V1 BY V2
    /CRITERIA = CIN(95) MXITER(100) MXSTEP(5) SCORING(1)
    SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0,
ABSOLUTE)
    PCONVERGE(0.000001, ABSOLUTE)
    /FIXED = V2 | SSTYPE(3)
    /METHOD = REML
    /PRINT = SOLUTION TESTCOV
    /REPEATED = time | SUBJECT(id) COVTYPE(ARH1) .

For the moment, I am just interested in the interrelations of those
variables, i.e. the effect of V2.

Does this make sense?

Thank you very much.

Kind regards,
Ruben

--
Ruben Real, Dipl.-Psych.
Professur für Interventionspsychologie am Lehrstuhl für
Psychologie I - Biologische Psychologie, Klinische Psychologie und
Psychotherapie
Marcusstr. 9-11
97070 Würzburg

office: ++49-931-31-80853
mobile: ++49-179-7500594

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: mixed models with repeated measurements

Putnick, Diane (NIH/NICHD) [E]
Hi Ruben,

I don't know if anyone else replied to you , but I believe you would want
to include time as a factor in your model in order to account for it.
Even if you aren't interested in the output for it, your estimate of V2
will differ if the repeated measurements are accounted for in the model.

MIXED
    V1 BY V2
    /CRITERIA = CIN(95) MXITER(100) MXSTEP(5) SCORING(1)
    SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
    PCONVERGE(0.000001, ABSOLUTE)
    /FIXED = time V2 | SSTYPE(3)
    /METHOD = REML
    /PRINT = SOLUTION TESTCOV
    /REPEATED = time | SUBJECT(id) COVTYPE(ARH1) .

Good luck!
Diane



On Fri, 22 Jan 2010 11:50:02 +0100, Ruben Real <ruben.real@uni-
wuerzburg.de> wrote:

>Dear all,
>
>I am trying to fit a mixed model to longitudinal data from a field
>study. Over a course of 2 weeks patients were asked 3 times a day
>(pseudo-randomly) to give subjective data (all likert-scales). Because
>it is a repeated design, I would want to allow for correlated
>residuals. Further, I would want to allow for heterogeneous variances,
>because of possible situation specific factors affecting measurements.
>
> From how I understand the literature I thought of the following model
>(SPSS-syntax):
>
>MIXED
>    V1 BY V2
>    /CRITERIA = CIN(95) MXITER(100) MXSTEP(5) SCORING(1)
>    SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0,
>ABSOLUTE)
>    PCONVERGE(0.000001, ABSOLUTE)
>    /FIXED = V2 | SSTYPE(3)
>    /METHOD = REML
>    /PRINT = SOLUTION TESTCOV
>    /REPEATED = time | SUBJECT(id) COVTYPE(ARH1) .
>
>For the moment, I am just interested in the interrelations of those
>variables, i.e. the effect of V2.
>
>Does this make sense?
>
>Thank you very much.
>
>Kind regards,
>Ruben
>
>--
>Ruben Real, Dipl.-Psych.
>Professur f�r Interventionspsychologie am Lehrstuhl f�r
>Psychologie I - Biologische Psychologie, Klinische Psychologie und
>Psychotherapie
>Marcusstr. 9-11
>97070 W�rzburg
>
>office: ++49-931-31-80853
>mobile: ++49-179-7500594
>
>=====================
>To manage your subscription to SPSSX-L, send a message to
>[hidden email] (not to SPSSX-L), with no body text except the
>command. To leave the list, send the command
>SIGNOFF SPSSX-L
>For a list of commands to manage subscriptions, send the command
>INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Question about confidence intervals

Allen Frommelt
We are currently working with a vendor that produces reports that only report the upper 95% confidence interval and a mean without reporting the lower confidence interval.  They also produce an Interquartile spread (IQS) that cuts off the first and fourth quartiles from the analysis.  I'm not familiar with these practices, but since they don't report statistical significance, it seems like they are skewing the analysis to show an effect that may not be there.  Does anyone have experience with these practices?

Thanks,

Allen

This email and all attachments are confidential and intended solely
for the use of the individual or entity to which they are addressed.
If you have received this email in error please notify the sender
by replying to this message. If you are not the intended recipient,
please delete this message and all attachments immediately.  Do not
copy, disclose, use or act upon the information contained. Please
note that any views or opinions presented in this email are solely
those of the author and do not necessarily represent those of the
company. Finally, the recipient should check this email and any
attachments for the presence of viruses. While every attempt is made
to verify that the contents are safe, the company accepts no liability
for any damage caused by any virus transmitted by this email.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Question about confidence intervals

Marta Garcia-Granero
Hi Allen

Allen Frommelt wrote:
> We are currently working with a vendor that produces reports that only report the upper 95% confidence interval and a mean without reporting the lower confidence interval.
The lack of a lower limit for the 95%CI means that they are using
one-tailed tests
>   They also produce an Interquartile spread (IQS) that cuts off the first and fourth quartiles from the analysis.
Could it be THIRD quartile? The fourth quartile doesn't exist... Anyway,
it doesn't mean that the are throwing away data. For highly skewed (non
symmetrical) variables, median and IQR (Inter quartile Range, I had
never heard the term IQS...) are more correct than means and SD.
>   I'm not familiar with these practices, but since they don't report statistical significance,
95%CI can be used "in lieu" of p-values
>  it seems like they are skewing the analysis to show an effect that may not be there.

Not necessarily. Do they give solid reasons for doing that?

HTH,
Marta GG

--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Question about confidence intervals

Art Kendall
In reply to this post by Allen Frommelt
A lot depends on the nature of the variables and the rhetorical role of
the summary stats.

For example, if the intended message wrt substantive/practical/policy
significance is  "The pop value of X, is not likely to be greater than
...", then this could be a reasonable argument.  What are the
implications of a "reasonable upper limit"?

Please clarify what you mean by "statistical significance".  Difference
wrt what?

Art Kendall
Social Research Consultants

On 1/27/2010 9:44 AM, Allen Frommelt wrote:

> We are currently working with a vendor that produces reports that only report the upper 95% confidence interval and a mean without reporting the lower confidence interval.  They also produce an Interquartile spread (IQS) that cuts off the first and fourth quartiles from the analysis.  I'm not familiar with these practices, but since they don't report statistical significance, it seems like they are skewing the analysis to show an effect that may not be there.  Does anyone have experience with these practices?
>
> Thanks,
>
> Allen
>
> This email and all attachments are confidential and intended solely
> for the use of the individual or entity to which they are addressed.
> If you have received this email in error please notify the sender
> by replying to this message. If you are not the intended recipient,
> please delete this message and all attachments immediately.  Do not
> copy, disclose, use or act upon the information contained. Please
> note that any views or opinions presented in this email are solely
> those of the author and do not necessarily represent those of the
> company. Finally, the recipient should check this email and any
> attachments for the presence of viruses. While every attempt is made
> to verify that the contents are safe, the company accepts no liability
> for any damage caused by any virus transmitted by this email.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Question about confidence intervals

Bruce Weaver
Administrator
In reply to this post by Allen Frommelt
Allen Frommelt wrote
We are currently working with a vendor that produces reports that only report the upper 95% confidence interval and a mean without reporting the lower confidence interval.  They also produce an Interquartile spread (IQS) that cuts off the first and fourth quartiles from the analysis.  I'm not familiar with these practices, but since they don't report statistical significance, it seems like they are skewing the analysis to show an effect that may not be there.  Does anyone have experience with these practices?

Thanks,

Allen
The difference between the 1st and 3rd quartiles (Q3 - Q1) is usually called the inter-quartile range.  It is often reported in conjunction with the median (when distributions are skewed).  The Wikipedia page is pretty good.

   http://en.wikipedia.org/wiki/Interquartile_range

HTH.

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Repeated measures ANOVA in mixed?

Joost van Ginkel
In reply to this post by Ruben Real
Suppose I would like to carry out a full-factorial repeated-measures
ANOVA with two or more within-subjects factors. Using a restructured
dataset, is it possible to exactly reproduce the results from GLM using
mixed models? And if so, does anyone know how this can be achieved? Many
thanks in advance.

Best regards,

Joost van Ginkel


Joost R. Van Ginkel, PhD
Leiden University
Faculty of Social and Behavioural Sciences
Data Theory Group
PO Box 9555
2300 RB Leiden
The Netherlands
Tel: +31-(0)71-527 3620
Fax: +31-(0)71-527 1721

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Repeated measures ANOVA in mixed?

Mike
----- Original Message -----
On Saturday, February 13, 2010 12:37 PM Joost van Ginkel wrote:
> Suppose I would like to carry out a full-factorial repeated-measures
> ANOVA with two or more within-subjects factors. Using a restructured
> dataset, is it possible to exactly reproduce the results from GLM using
> mixed models? And if so, does anyone know how this can be achieved? Many
> thanks in advance.

I was hoping that someone would respond to this because I
was under the impression that the Mixed procedure should be
able to re-create GLM results.  I have never used Mixed but have
a fair amount of experience with GLM in analyzying data from
experiments in cognitive psychology.  One case that I'd like to
review here is the Lexical Decision Task (LDT) from the
Online Psychological Laboratory (OPL) website which the
American Psychological Association (APA) is helping to sponsor.
The http://opl.apa.org  provides a web-based interface for doing
shortened versions of some classic expeirments.  Students
can participate in these experiments and their data is saved and
available to anyone to analyze.  One can read more about the LDT
and access data from the link above -- the data is provided in
an Excel spreadsheet which can be easily imported into SPSS.

The LDT uses a 3-way completely within-subject design with the
following factors/independent variables:
(1) Wordness: is a pair of sequentially presented letters string (a) words
(e.g., CHAIR-NURSE) or (b) contains a nonword (e.g., FLARP-NURSE)
(2) Relatedness: is a pair of letter string (a) related (e.g., DOCTOR-NURSE)
or (b) unrelated (CHAIR-NURSE); nonword strings are also classified
as related or unrelated on the basis of a norming study by Doublas Nelson
and which are further described on the OPL website and links there
to the "University of Florida Norms" that were used for the stimuli,
and
(3) Presentation Rate:  the amount of time between the presentation
of the first letter string and the second letter string was either (a) 300
milliseconds, (b) 600 ms, or (c) 900 ms.

The three independent variables are factorially combined and define 12
conditions.  A replication factor of six trials consisting of different stimulus
presentation disappears as the mean RT becomes the data point for an
individual in a condition.  This means that every subject has 12 (repeated
measures) variables representing the highest order interaction (i.e., 2x2x3=12).
The OPL website records RTs in seconds but which should be transformed
into milliseconds (i.e, multiply by 1000) which is the time scale that the
cognitive processes being studied operate on.

In the past the SPSS procedure MANOVA was used to analyze this type
of design (thought BMDP provided superior tools) but this has been
replaced by GLM and below is syntax for one version of the three-way
repeated measures ANOVA used to analyze the data.

** 3-Way Repeated Measures ANOVA for OPL Lexical Decision Task.
subtitle "3-Way Repeated Measures ANOVA for OPL LDT".
GLM
wrel_300,wrel_600,wrel_900,
wunr_300,wunr_600,wunr_900,
nrel_300,nrel_600,nrel_900,
nunr_300,nunr_600,nunr_900
/wsfactors=wordness (2), related (2),present(3)
/measure=RT_msec
/METHOD = SSTYPE(3)
/CRITERIA = ALPHA(.05)
/print=descriptive
/plot=profile(related*wordness)
/WSDESIGN = wordness,related,present,wordness*related,
related*present,wordness*present,wordness*related*present
/emmeans=tables(related)
/emmeans=tables(wordness)
/emmeans=tables(present)
/emmeans=tables(wordness*related) compare (related)
/emmeans=tables(related*present)
/emmeans=tables(wordness*present)
/emmeans=tables(wordness*related*present).

The EMMEANS provides descriptives statistics for the main effects and
interactions.  The two-way interaction representing wordness by
related also requests an LSD comparison between the related vs
unrelated means at different levels of wordness (i.e, for words pairs
and nonword pairs).  The key question here is whether the relatedness
effect is the same magnitude in milliseconds for word pairs and nonword
pairs.

It is my understanding that in order to do a similar type of analysis in
the Mixed Models procedure, one would have to convert this repeated
measures representation to a "regression format", that is, providing grouping
variables for the within-subject conditions and reducing the number of
dependent variables to one (I refer to this as "regression format" because
correlational/regression analysis is simplified when repeated measures data
is provided in this format -- one just has to remember that the withing-subject
factors will produce correlations between response which have to be taken
into account).  This is accomplished by the VARSTOCASES
procedure:

VARSTOCASES
 /MAKE RT_msec FROM
   WRel_300 WRel_600 WRel_900
   WUnr_300 WUnr_600 WUnr_900
   NRel_300 NRel_600 NRel_900
   NUnr_300 NUnr_600 NUnr_900
/INDEX=Word "Word vs Nonword"(2)
  Related "Related vs Unrelated"(2)
  Present "300vs600vs900msec"(3)
/KEEP=UserID Age sex
/NULL=KEEP.

The variable UserID uniquely identifies each subject and the variables "age"
and "sex" (both nurmeric variables) are included just in case.

I could not find any syntax examples that used a within-subject factorial
design, so I tried to specify the analysis through the menu (a bad decision
but I had little choice).  To make a long story short, after specifying the
design as best as I could, SPSS tried to execute the procedure but
encountered a "catastrophic error" which closed the data window and
was proceeding to shut down the SPSS processor.  I copied the text
generated by my menu specification and what appears to be an error
message:

MIXED RT_msec BY Word Related Present
/CRITERIA=CIN(95) MXITER(100) MXSTEP(5)
 SCORING(1) SINGULAR(0.000000000001)
 HCONVERGE(0, ABSOLUTE)
 LCONVERGE(0, ABSOLUTE)
 PCONVERGE(0.000001, ABSOLUTE)
/FIXED=| SSTYPE(3)
/METHOD=REML
/REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(DIAG).

_ASSERT(qfirst) failed in mxceff

I assume that the "_ASSERT..." statement reflects something about where
the error occurred.

Regarding the Menu generated syntax:  I assume that the CRITERIA can be
deleted since they reflect default settings.  I am puzzled by the /FIXED=
statement where I thought that at least the main effects would be specified
(i.e., word, related, present).  I am also puzzled by the /REPEATED statement
use of the 3-way interaction.  I was half expecting that I would have to specify
which error term to use with test in the ANOVA (i.e., interaction of the factor[s]
with the subject term; this had to be done in SAS long ago before they instituted
a "REPEATED" statement in their GLM procedure -- I had to point out to
a student at their oral defense that their SAS GLM ANOVA was wrong because
it was a completely within-subjects design with several factors but he was testing
each factor with one error term, that is, he was treating the design as if it were a
between-subjects design).

Just to make sure that the data had been restructured correctly, I ran a
UNIANOVA analysis (i.e., treating this as a completely between-subjects
design) which came out fine.  Below is the syntax:

UNIANOVA
 RT_msec by word related present
  /method=sstype(3)
  /intercept=include
  /print=descriptive homo etasq
  /emmeans=tables(related)
  /emmeans=tables(word)
  /emmeans=tables(present)
  /emmeans=tables(word*related)
  /emmeans=tables(related*present)
  /emmeans=tables(word*present)
  /emmeans=tables(word*related*present)
  /Design.

So, to get back to the original question:  what is the correct way to
specify a completely within-subjects design in the MIXED procedure
in order to duplicate a GLM analysis of the same design?

-Mike Palij
New York University
[hidden email]

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Repeated measures ANOVA in mixed?

Bruce Weaver
Administrator
Hi Mike.  I don't have time for a careful look at this right now, but here is a suggestion.  Here is your MIXED syntax:

MIXED RT_msec BY Word Related Present
/CRITERIA=CIN(95) MXITER(100) MXSTEP(5)
 SCORING(1) SINGULAR(0.000000000001)
 HCONVERGE(0, ABSOLUTE)
 LCONVERGE(0, ABSOLUTE)
 PCONVERGE(0.000001, ABSOLUTE)
/FIXED=| SSTYPE(3)
/METHOD=REML
/REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(DIAG).

Try this instead:

MIXED RT_msec BY Word Related Present
 /FIXED= word related present word*related word*present related*present word*related*present
 | SSTYPE(3)
 /METHOD=REML
 /REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(UN).

This guess as to what's wrong is based on an example of a two-factor split-plot design you can see here:

  http://www.angelfire.com/wv/bwhomedir/spss/mixed007.txt

Based on that example, I changed COVTYPE to UN--this seems to be necessary to generate the same standard errors as GLM.

If it's still not working with those changes, I'd try adding main effect and two-way interaction terms to the /REPEATED subcommand.  But as I've never used MIXED to run an ANOVA model with two or more repeated measures factors, that's just a guess.

HTH.

Cheers,
Bruce



Mike Palij wrote
----- Original Message -----
On Saturday, February 13, 2010 12:37 PM Joost van Ginkel wrote:
> Suppose I would like to carry out a full-factorial repeated-measures
> ANOVA with two or more within-subjects factors. Using a restructured
> dataset, is it possible to exactly reproduce the results from GLM using
> mixed models? And if so, does anyone know how this can be achieved? Many
> thanks in advance.

I was hoping that someone would respond to this because I
was under the impression that the Mixed procedure should be
able to re-create GLM results.  I have never used Mixed but have
a fair amount of experience with GLM in analyzying data from
experiments in cognitive psychology.  One case that I'd like to
review here is the Lexical Decision Task (LDT) from the
Online Psychological Laboratory (OPL) website which the
American Psychological Association (APA) is helping to sponsor.
The http://opl.apa.org  provides a web-based interface for doing
shortened versions of some classic expeirments.  Students
can participate in these experiments and their data is saved and
available to anyone to analyze.  One can read more about the LDT
and access data from the link above -- the data is provided in
an Excel spreadsheet which can be easily imported into SPSS.

The LDT uses a 3-way completely within-subject design with the
following factors/independent variables:
(1) Wordness: is a pair of sequentially presented letters string (a) words
(e.g., CHAIR-NURSE) or (b) contains a nonword (e.g., FLARP-NURSE)
(2) Relatedness: is a pair of letter string (a) related (e.g., DOCTOR-NURSE)
or (b) unrelated (CHAIR-NURSE); nonword strings are also classified
as related or unrelated on the basis of a norming study by Doublas Nelson
and which are further described on the OPL website and links there
to the "University of Florida Norms" that were used for the stimuli,
and
(3) Presentation Rate:  the amount of time between the presentation
of the first letter string and the second letter string was either (a) 300
milliseconds, (b) 600 ms, or (c) 900 ms.

The three independent variables are factorially combined and define 12
conditions.  A replication factor of six trials consisting of different stimulus
presentation disappears as the mean RT becomes the data point for an
individual in a condition.  This means that every subject has 12 (repeated
measures) variables representing the highest order interaction (i.e., 2x2x3=12).
The OPL website records RTs in seconds but which should be transformed
into milliseconds (i.e, multiply by 1000) which is the time scale that the
cognitive processes being studied operate on.

In the past the SPSS procedure MANOVA was used to analyze this type
of design (thought BMDP provided superior tools) but this has been
replaced by GLM and below is syntax for one version of the three-way
repeated measures ANOVA used to analyze the data.

** 3-Way Repeated Measures ANOVA for OPL Lexical Decision Task.
subtitle "3-Way Repeated Measures ANOVA for OPL LDT".
GLM
wrel_300,wrel_600,wrel_900,
wunr_300,wunr_600,wunr_900,
nrel_300,nrel_600,nrel_900,
nunr_300,nunr_600,nunr_900
/wsfactors=wordness (2), related (2),present(3)
/measure=RT_msec
/METHOD = SSTYPE(3)
/CRITERIA = ALPHA(.05)
/print=descriptive
/plot=profile(related*wordness)
/WSDESIGN = wordness,related,present,wordness*related,
related*present,wordness*present,wordness*related*present
/emmeans=tables(related)
/emmeans=tables(wordness)
/emmeans=tables(present)
/emmeans=tables(wordness*related) compare (related)
/emmeans=tables(related*present)
/emmeans=tables(wordness*present)
/emmeans=tables(wordness*related*present).

The EMMEANS provides descriptives statistics for the main effects and
interactions.  The two-way interaction representing wordness by
related also requests an LSD comparison between the related vs
unrelated means at different levels of wordness (i.e, for words pairs
and nonword pairs).  The key question here is whether the relatedness
effect is the same magnitude in milliseconds for word pairs and nonword
pairs.

It is my understanding that in order to do a similar type of analysis in
the Mixed Models procedure, one would have to convert this repeated
measures representation to a "regression format", that is, providing grouping
variables for the within-subject conditions and reducing the number of
dependent variables to one (I refer to this as "regression format" because
correlational/regression analysis is simplified when repeated measures data
is provided in this format -- one just has to remember that the withing-subject
factors will produce correlations between response which have to be taken
into account).  This is accomplished by the VARSTOCASES
procedure:

VARSTOCASES
 /MAKE RT_msec FROM
   WRel_300 WRel_600 WRel_900
   WUnr_300 WUnr_600 WUnr_900
   NRel_300 NRel_600 NRel_900
   NUnr_300 NUnr_600 NUnr_900
/INDEX=Word "Word vs Nonword"(2)
  Related "Related vs Unrelated"(2)
  Present "300vs600vs900msec"(3)
/KEEP=UserID Age sex
/NULL=KEEP.

The variable UserID uniquely identifies each subject and the variables "age"
and "sex" (both nurmeric variables) are included just in case.

I could not find any syntax examples that used a within-subject factorial
design, so I tried to specify the analysis through the menu (a bad decision
but I had little choice).  To make a long story short, after specifying the
design as best as I could, SPSS tried to execute the procedure but
encountered a "catastrophic error" which closed the data window and
was proceeding to shut down the SPSS processor.  I copied the text
generated by my menu specification and what appears to be an error
message:

MIXED RT_msec BY Word Related Present
/CRITERIA=CIN(95) MXITER(100) MXSTEP(5)
 SCORING(1) SINGULAR(0.000000000001)
 HCONVERGE(0, ABSOLUTE)
 LCONVERGE(0, ABSOLUTE)
 PCONVERGE(0.000001, ABSOLUTE)
/FIXED=| SSTYPE(3)
/METHOD=REML
/REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(DIAG).

_ASSERT(qfirst) failed in mxceff

I assume that the "_ASSERT..." statement reflects something about where
the error occurred.

Regarding the Menu generated syntax:  I assume that the CRITERIA can be
deleted since they reflect default settings.  I am puzzled by the /FIXED=
statement where I thought that at least the main effects would be specified
(i.e., word, related, present).  I am also puzzled by the /REPEATED statement
use of the 3-way interaction.  I was half expecting that I would have to specify
which error term to use with test in the ANOVA (i.e., interaction of the factor[s]
with the subject term; this had to be done in SAS long ago before they instituted
a "REPEATED" statement in their GLM procedure -- I had to point out to
a student at their oral defense that their SAS GLM ANOVA was wrong because
it was a completely within-subjects design with several factors but he was testing
each factor with one error term, that is, he was treating the design as if it were a
between-subjects design).

Just to make sure that the data had been restructured correctly, I ran a
UNIANOVA analysis (i.e., treating this as a completely between-subjects
design) which came out fine.  Below is the syntax:

UNIANOVA
 RT_msec by word related present
  /method=sstype(3)
  /intercept=include
  /print=descriptive homo etasq
  /emmeans=tables(related)
  /emmeans=tables(word)
  /emmeans=tables(present)
  /emmeans=tables(word*related)
  /emmeans=tables(related*present)
  /emmeans=tables(word*present)
  /emmeans=tables(word*related*present)
  /Design.

So, to get back to the original question:  what is the correct way to
specify a completely within-subjects design in the MIXED procedure
in order to duplicate a GLM analysis of the same design?

-Mike Palij
New York University
mp26@nyu.edu

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Repeated measures ANOVA in mixed?

Mike
Hi Bruce & All,

Unfortunately, there is a catastrophic crash which eliminates
the data window.  Below is the syntax provided by Bruce but
the last line appears to be an error message:

MIXED RT_msec BY Word Related Present
/FIXED= word related present word*related word*present related*present
word*related*present
| SSTYPE(3)
/METHOD=REML
/REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(UN).
_ASSERT(qfirst) failed in mxceff

I have tried tweaking various statements but nothing seems prevent
error messages or crashes.  I await some of the SPSS folks to chime
in about what may be going on here.  I have a feeling that there is
something about this type of design that MIXED is not handling
properly or it requires very specific statements in order to avoid
crashing.

-Mike Palij
New York University
[hidden email]



----- Original Message -----
From: "Bruce Weaver" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, February 16, 2010 7:29 AM
Subject: Re: Repeated measures ANOVA in mixed?


> Hi Mike.  I don't have time for a careful look at this right now, but here is
> a suggestion.  Here is your MIXED syntax:
>
> MIXED RT_msec BY Word Related Present
> /CRITERIA=CIN(95) MXITER(100) MXSTEP(5)
> SCORING(1) SINGULAR(0.000000000001)
> HCONVERGE(0, ABSOLUTE)
> LCONVERGE(0, ABSOLUTE)
> PCONVERGE(0.000001, ABSOLUTE)
> /FIXED=| SSTYPE(3)
> /METHOD=REML
> /REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(DIAG).
>
> Try this instead:
>
> MIXED RT_msec BY Word Related Present
> /FIXED= word related present word*related word*present related*present
> word*related*present
> | SSTYPE(3)
> /METHOD=REML
> /REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(UN).
>
> This guess as to what's wrong is based on an example of a two-factor
> split-plot design you can see here:
>
>  http://www.angelfire.com/wv/bwhomedir/spss/mixed007.txt
>
> Based on that example, I changed COVTYPE to UN--this seems to be necessary
> to generate the same standard errors as GLM.
>
> If it's still not working with those changes, I'd try adding main effect and
> two-way interaction terms to the /REPEATED subcommand.  But as I've never
> used MIXED to run an ANOVA model with two or more repeated measures factors,
> that's just a guess.
>
> HTH.
>
> Cheers,
> Bruce
>
>
>
>
> Mike Palij wrote:
>>
>> ----- Original Message -----
>> On Saturday, February 13, 2010 12:37 PM Joost van Ginkel wrote:
>>> Suppose I would like to carry out a full-factorial repeated-measures
>>> ANOVA with two or more within-subjects factors. Using a restructured
>>> dataset, is it possible to exactly reproduce the results from GLM using
>>> mixed models? And if so, does anyone know how this can be achieved? Many
>>> thanks in advance.
>>
>> I was hoping that someone would respond to this because I
>> was under the impression that the Mixed procedure should be
>> able to re-create GLM results.  I have never used Mixed but have
>> a fair amount of experience with GLM in analyzying data from
>> experiments in cognitive psychology.  One case that I'd like to
>> review here is the Lexical Decision Task (LDT) from the
>> Online Psychological Laboratory (OPL) website which the
>> American Psychological Association (APA) is helping to sponsor.
>> The http://opl.apa.org   provides a web-based interface for doing
>> shortened versions of some classic expeirments.  Students
>> can participate in these experiments and their data is saved and
>> available to anyone to analyze.  One can read more about the LDT
>> and access data from the link above -- the data is provided in
>> an Excel spreadsheet which can be easily imported into SPSS.
>>
>> The LDT uses a 3-way completely within-subject design with the
>> following factors/independent variables:
>> (1) Wordness: is a pair of sequentially presented letters string (a) words
>> (e.g., CHAIR-NURSE) or (b) contains a nonword (e.g., FLARP-NURSE)
>> (2) Relatedness: is a pair of letter string (a) related (e.g.,
>> DOCTOR-NURSE)
>> or (b) unrelated (CHAIR-NURSE); nonword strings are also classified
>> as related or unrelated on the basis of a norming study by Doublas Nelson
>> and which are further described on the OPL website and links there
>> to the "University of Florida Norms" that were used for the stimuli,
>> and
>> (3) Presentation Rate:  the amount of time between the presentation
>> of the first letter string and the second letter string was either (a) 300
>> milliseconds, (b) 600 ms, or (c) 900 ms.
>>
>> The three independent variables are factorially combined and define 12
>> conditions.  A replication factor of six trials consisting of different
>> stimulus
>> presentation disappears as the mean RT becomes the data point for an
>> individual in a condition.  This means that every subject has 12 (repeated
>> measures) variables representing the highest order interaction (i.e.,
>> 2x2x3=12).
>> The OPL website records RTs in seconds but which should be transformed
>> into milliseconds (i.e, multiply by 1000) which is the time scale that the
>> cognitive processes being studied operate on.
>>
>> In the past the SPSS procedure MANOVA was used to analyze this type
>> of design (thought BMDP provided superior tools) but this has been
>> replaced by GLM and below is syntax for one version of the three-way
>> repeated measures ANOVA used to analyze the data.
>>
>> ** 3-Way Repeated Measures ANOVA for OPL Lexical Decision Task.
>> subtitle "3-Way Repeated Measures ANOVA for OPL LDT".
>> GLM
>> wrel_300,wrel_600,wrel_900,
>> wunr_300,wunr_600,wunr_900,
>> nrel_300,nrel_600,nrel_900,
>> nunr_300,nunr_600,nunr_900
>> /wsfactors=wordness (2), related (2),present(3)
>> /measure=RT_msec
>> /METHOD = SSTYPE(3)
>> /CRITERIA = ALPHA(.05)
>> /print=descriptive
>> /plot=profile(related*wordness)
>> /WSDESIGN = wordness,related,present,wordness*related,
>> related*present,wordness*present,wordness*related*present
>> /emmeans=tables(related)
>> /emmeans=tables(wordness)
>> /emmeans=tables(present)
>> /emmeans=tables(wordness*related) compare (related)
>> /emmeans=tables(related*present)
>> /emmeans=tables(wordness*present)
>> /emmeans=tables(wordness*related*present).
>>
>> The EMMEANS provides descriptives statistics for the main effects and
>> interactions.  The two-way interaction representing wordness by
>> related also requests an LSD comparison between the related vs
>> unrelated means at different levels of wordness (i.e, for words pairs
>> and nonword pairs).  The key question here is whether the relatedness
>> effect is the same magnitude in milliseconds for word pairs and nonword
>> pairs.
>>
>> It is my understanding that in order to do a similar type of analysis in
>> the Mixed Models procedure, one would have to convert this repeated
>> measures representation to a "regression format", that is, providing
>> grouping
>> variables for the within-subject conditions and reducing the number of
>> dependent variables to one (I refer to this as "regression format" because
>> correlational/regression analysis is simplified when repeated measures
>> data
>> is provided in this format -- one just has to remember that the
>> withing-subject
>> factors will produce correlations between response which have to be taken
>> into account).  This is accomplished by the VARSTOCASES
>> procedure:
>>
>> VARSTOCASES
>>  /MAKE RT_msec FROM
>>    WRel_300 WRel_600 WRel_900
>>    WUnr_300 WUnr_600 WUnr_900
>>    NRel_300 NRel_600 NRel_900
>>    NUnr_300 NUnr_600 NUnr_900
>> /INDEX=Word "Word vs Nonword"(2)
>>   Related "Related vs Unrelated"(2)
>>   Present "300vs600vs900msec"(3)
>> /KEEP=UserID Age sex
>> /NULL=KEEP.
>>
>> The variable UserID uniquely identifies each subject and the variables
>> "age"
>> and "sex" (both nurmeric variables) are included just in case.
>>
>> I could not find any syntax examples that used a within-subject factorial
>> design, so I tried to specify the analysis through the menu (a bad
>> decision
>> but I had little choice).  To make a long story short, after specifying
>> the
>> design as best as I could, SPSS tried to execute the procedure but
>> encountered a "catastrophic error" which closed the data window and
>> was proceeding to shut down the SPSS processor.  I copied the text
>> generated by my menu specification and what appears to be an error
>> message:
>>
>> MIXED RT_msec BY Word Related Present
>> /CRITERIA=CIN(95) MXITER(100) MXSTEP(5)
>>  SCORING(1) SINGULAR(0.000000000001)
>>  HCONVERGE(0, ABSOLUTE)
>>  LCONVERGE(0, ABSOLUTE)
>>  PCONVERGE(0.000001, ABSOLUTE)
>> /FIXED=| SSTYPE(3)
>> /METHOD=REML
>> /REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(DIAG).
>>
>> _ASSERT(qfirst) failed in mxceff
>>
>> I assume that the "_ASSERT..." statement reflects something about where
>> the error occurred.
>>
>> Regarding the Menu generated syntax:  I assume that the CRITERIA can be
>> deleted since they reflect default settings.  I am puzzled by the /FIXED=
>> statement where I thought that at least the main effects would be
>> specified
>> (i.e., word, related, present).  I am also puzzled by the /REPEATED
>> statement
>> use of the 3-way interaction.  I was half expecting that I would have to
>> specify
>> which error term to use with test in the ANOVA (i.e., interaction of the
>> factor[s]
>> with the subject term; this had to be done in SAS long ago before they
>> instituted
>> a "REPEATED" statement in their GLM procedure -- I had to point out to
>> a student at their oral defense that their SAS GLM ANOVA was wrong because
>> it was a completely within-subjects design with several factors but he was
>> testing
>> each factor with one error term, that is, he was treating the design as if
>> it were a
>> between-subjects design).
>>
>> Just to make sure that the data had been restructured correctly, I ran a
>> UNIANOVA analysis (i.e., treating this as a completely between-subjects
>> design) which came out fine.  Below is the syntax:
>>
>> UNIANOVA
>>  RT_msec by word related present
>>   /method=sstype(3)
>>   /intercept=include
>>   /print=descriptive homo etasq
>>   /emmeans=tables(related)
>>   /emmeans=tables(word)
>>   /emmeans=tables(present)
>>   /emmeans=tables(word*related)
>>   /emmeans=tables(related*present)
>>   /emmeans=tables(word*present)
>>   /emmeans=tables(word*related*present)
>>   /Design.
>>
>> So, to get back to the original question:  what is the correct way to
>> specify a completely within-subjects design in the MIXED procedure
>> in order to duplicate a GLM analysis of the same design?
>>
>> -Mike Palij
>> New York University
>> [hidden email]
>>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Repeated measures ANOVA in mixed?

Bruce Weaver
Administrator
Hi Mike.  I downloaded some of the LDT data from the website you gave, and tried it on my machine (SPSS 17.0.3 running under Windoze XP Professional).  The following all ran without errors.  Note that I had to modify your variable names somewhat.


** 3-Way Repeated Measures ANOVA for OPL Lexical Decision Task.
subtitle "3-Way Repeated Measures ANOVA for OPL LDT".
GLM
 wr300,wr600,wr900,
 wu300,wu600,wu900,
 nwr300,nwr600,nwr900,
 nwu300,nwu600,nwu900
 /wsfactors=wordness (2), related (2),present(3)
 /measure=RT_msec
 /METHOD = SSTYPE(3)
 /CRITERIA = ALPHA(.05)
 /print=descriptive
 /plot=profile(related*wordness)
 /WSDESIGN = wordness,related,present,wordness*related,
  related*present,wordness*present,wordness*related*present
 /emmeans=tables(related)
 /emmeans=tables(wordness)
 /emmeans=tables(present)
 /emmeans=tables(wordness*related) compare (related)
 /emmeans=tables(related*present)
 /emmeans=tables(wordness*present)
 /emmeans=tables(wordness*related*present).


VARSTOCASES
 /MAKE RT_msec FROM
   WR300 WR600 WR900
   WU300 WU600 WU900
   NWR300 NWR600 NWR900
   NWU300 NWU600 NWU900
 /INDEX=Word "Word vs Nonword"(2)
  Related "Related vs Unrelated"(2)
  Present "300vs600vs900msec"(3)
 /KEEP=UserID ClassID Gender Age DateTaken
 /NULL=KEEP.


crosstabs word by related by present .

MIXED RT_msec BY Word Related Present
 /FIXED= word related present word*related word*present related*present word*related*present
 | SSTYPE(3)
 /METHOD=REML
 /PRINT = solution
 /REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(UN).

MIXED RT_msec BY Word Related Present
 /FIXED= word related present word*related word*present related*present word*related*present
 | SSTYPE(3)
 /METHOD=ML
 /PRINT = solution
 /REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(UN).

The F-tests for REML  and ML were similar, but not identical; and neither of them matched all of the F-tests from GLM.  But they did run.

Regarding the data file, I just took the data from the schools showing in the first window (without scrolling down).  The total number of cases in my file (after VARSTOCASES) was 1284 (i.e., 107 subjects x 12 cells).


Bruce


Mike Palij wrote
Hi Bruce & All,

Unfortunately, there is a catastrophic crash which eliminates
the data window.  Below is the syntax provided by Bruce but
the last line appears to be an error message:

MIXED RT_msec BY Word Related Present
/FIXED= word related present word*related word*present related*present
word*related*present
| SSTYPE(3)
/METHOD=REML
/REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(UN).
_ASSERT(qfirst) failed in mxceff

I have tried tweaking various statements but nothing seems prevent
error messages or crashes.  I await some of the SPSS folks to chime
in about what may be going on here.  I have a feeling that there is
something about this type of design that MIXED is not handling
properly or it requires very specific statements in order to avoid
crashing.

-Mike Palij
New York University
mp26@nyu.edu



----- Original Message -----
From: "Bruce Weaver" <bruce.weaver@hotmail.com>
To: <SPSSX-L@LISTSERV.UGA.EDU>
Sent: Tuesday, February 16, 2010 7:29 AM
Subject: Re: Repeated measures ANOVA in mixed?


> Hi Mike.  I don't have time for a careful look at this right now, but here is
> a suggestion.  Here is your MIXED syntax:
>
> MIXED RT_msec BY Word Related Present
> /CRITERIA=CIN(95) MXITER(100) MXSTEP(5)
> SCORING(1) SINGULAR(0.000000000001)
> HCONVERGE(0, ABSOLUTE)
> LCONVERGE(0, ABSOLUTE)
> PCONVERGE(0.000001, ABSOLUTE)
> /FIXED=| SSTYPE(3)
> /METHOD=REML
> /REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(DIAG).
>
> Try this instead:
>
> MIXED RT_msec BY Word Related Present
> /FIXED= word related present word*related word*present related*present
> word*related*present
> | SSTYPE(3)
> /METHOD=REML
> /REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(UN).
>
> This guess as to what's wrong is based on an example of a two-factor
> split-plot design you can see here:
>
>  http://www.angelfire.com/wv/bwhomedir/spss/mixed007.txt
>
> Based on that example, I changed COVTYPE to UN--this seems to be necessary
> to generate the same standard errors as GLM.
>
> If it's still not working with those changes, I'd try adding main effect and
> two-way interaction terms to the /REPEATED subcommand.  But as I've never
> used MIXED to run an ANOVA model with two or more repeated measures factors,
> that's just a guess.
>
> HTH.
>
> Cheers,
> Bruce
>
>
>
>
> Mike Palij wrote:
>>
>> ----- Original Message -----
>> On Saturday, February 13, 2010 12:37 PM Joost van Ginkel wrote:
>>> Suppose I would like to carry out a full-factorial repeated-measures
>>> ANOVA with two or more within-subjects factors. Using a restructured
>>> dataset, is it possible to exactly reproduce the results from GLM using
>>> mixed models? And if so, does anyone know how this can be achieved? Many
>>> thanks in advance.
>>
>> I was hoping that someone would respond to this because I
>> was under the impression that the Mixed procedure should be
>> able to re-create GLM results.  I have never used Mixed but have
>> a fair amount of experience with GLM in analyzying data from
>> experiments in cognitive psychology.  One case that I'd like to
>> review here is the Lexical Decision Task (LDT) from the
>> Online Psychological Laboratory (OPL) website which the
>> American Psychological Association (APA) is helping to sponsor.
>> The http://opl.apa.org   provides a web-based interface for doing
>> shortened versions of some classic expeirments.  Students
>> can participate in these experiments and their data is saved and
>> available to anyone to analyze.  One can read more about the LDT
>> and access data from the link above -- the data is provided in
>> an Excel spreadsheet which can be easily imported into SPSS.
>>
>> The LDT uses a 3-way completely within-subject design with the
>> following factors/independent variables:
>> (1) Wordness: is a pair of sequentially presented letters string (a) words
>> (e.g., CHAIR-NURSE) or (b) contains a nonword (e.g., FLARP-NURSE)
>> (2) Relatedness: is a pair of letter string (a) related (e.g.,
>> DOCTOR-NURSE)
>> or (b) unrelated (CHAIR-NURSE); nonword strings are also classified
>> as related or unrelated on the basis of a norming study by Doublas Nelson
>> and which are further described on the OPL website and links there
>> to the "University of Florida Norms" that were used for the stimuli,
>> and
>> (3) Presentation Rate:  the amount of time between the presentation
>> of the first letter string and the second letter string was either (a) 300
>> milliseconds, (b) 600 ms, or (c) 900 ms.
>>
>> The three independent variables are factorially combined and define 12
>> conditions.  A replication factor of six trials consisting of different
>> stimulus
>> presentation disappears as the mean RT becomes the data point for an
>> individual in a condition.  This means that every subject has 12 (repeated
>> measures) variables representing the highest order interaction (i.e.,
>> 2x2x3=12).
>> The OPL website records RTs in seconds but which should be transformed
>> into milliseconds (i.e, multiply by 1000) which is the time scale that the
>> cognitive processes being studied operate on.
>>
>> In the past the SPSS procedure MANOVA was used to analyze this type
>> of design (thought BMDP provided superior tools) but this has been
>> replaced by GLM and below is syntax for one version of the three-way
>> repeated measures ANOVA used to analyze the data.
>>
>> ** 3-Way Repeated Measures ANOVA for OPL Lexical Decision Task.
>> subtitle "3-Way Repeated Measures ANOVA for OPL LDT".
>> GLM
>> wrel_300,wrel_600,wrel_900,
>> wunr_300,wunr_600,wunr_900,
>> nrel_300,nrel_600,nrel_900,
>> nunr_300,nunr_600,nunr_900
>> /wsfactors=wordness (2), related (2),present(3)
>> /measure=RT_msec
>> /METHOD = SSTYPE(3)
>> /CRITERIA = ALPHA(.05)
>> /print=descriptive
>> /plot=profile(related*wordness)
>> /WSDESIGN = wordness,related,present,wordness*related,
>> related*present,wordness*present,wordness*related*present
>> /emmeans=tables(related)
>> /emmeans=tables(wordness)
>> /emmeans=tables(present)
>> /emmeans=tables(wordness*related) compare (related)
>> /emmeans=tables(related*present)
>> /emmeans=tables(wordness*present)
>> /emmeans=tables(wordness*related*present).
>>
>> The EMMEANS provides descriptives statistics for the main effects and
>> interactions.  The two-way interaction representing wordness by
>> related also requests an LSD comparison between the related vs
>> unrelated means at different levels of wordness (i.e, for words pairs
>> and nonword pairs).  The key question here is whether the relatedness
>> effect is the same magnitude in milliseconds for word pairs and nonword
>> pairs.
>>
>> It is my understanding that in order to do a similar type of analysis in
>> the Mixed Models procedure, one would have to convert this repeated
>> measures representation to a "regression format", that is, providing
>> grouping
>> variables for the within-subject conditions and reducing the number of
>> dependent variables to one (I refer to this as "regression format" because
>> correlational/regression analysis is simplified when repeated measures
>> data
>> is provided in this format -- one just has to remember that the
>> withing-subject
>> factors will produce correlations between response which have to be taken
>> into account).  This is accomplished by the VARSTOCASES
>> procedure:
>>
>> VARSTOCASES
>>  /MAKE RT_msec FROM
>>    WRel_300 WRel_600 WRel_900
>>    WUnr_300 WUnr_600 WUnr_900
>>    NRel_300 NRel_600 NRel_900
>>    NUnr_300 NUnr_600 NUnr_900
>> /INDEX=Word "Word vs Nonword"(2)
>>   Related "Related vs Unrelated"(2)
>>   Present "300vs600vs900msec"(3)
>> /KEEP=UserID Age sex
>> /NULL=KEEP.
>>
>> The variable UserID uniquely identifies each subject and the variables
>> "age"
>> and "sex" (both nurmeric variables) are included just in case.
>>
>> I could not find any syntax examples that used a within-subject factorial
>> design, so I tried to specify the analysis through the menu (a bad
>> decision
>> but I had little choice).  To make a long story short, after specifying
>> the
>> design as best as I could, SPSS tried to execute the procedure but
>> encountered a "catastrophic error" which closed the data window and
>> was proceeding to shut down the SPSS processor.  I copied the text
>> generated by my menu specification and what appears to be an error
>> message:
>>
>> MIXED RT_msec BY Word Related Present
>> /CRITERIA=CIN(95) MXITER(100) MXSTEP(5)
>>  SCORING(1) SINGULAR(0.000000000001)
>>  HCONVERGE(0, ABSOLUTE)
>>  LCONVERGE(0, ABSOLUTE)
>>  PCONVERGE(0.000001, ABSOLUTE)
>> /FIXED=| SSTYPE(3)
>> /METHOD=REML
>> /REPEATED=Word*Related*Present | SUBJECT(UserID) COVTYPE(DIAG).
>>
>> _ASSERT(qfirst) failed in mxceff
>>
>> I assume that the "_ASSERT..." statement reflects something about where
>> the error occurred.
>>
>> Regarding the Menu generated syntax:  I assume that the CRITERIA can be
>> deleted since they reflect default settings.  I am puzzled by the /FIXED=
>> statement where I thought that at least the main effects would be
>> specified
>> (i.e., word, related, present).  I am also puzzled by the /REPEATED
>> statement
>> use of the 3-way interaction.  I was half expecting that I would have to
>> specify
>> which error term to use with test in the ANOVA (i.e., interaction of the
>> factor[s]
>> with the subject term; this had to be done in SAS long ago before they
>> instituted
>> a "REPEATED" statement in their GLM procedure -- I had to point out to
>> a student at their oral defense that their SAS GLM ANOVA was wrong because
>> it was a completely within-subjects design with several factors but he was
>> testing
>> each factor with one error term, that is, he was treating the design as if
>> it were a
>> between-subjects design).
>>
>> Just to make sure that the data had been restructured correctly, I ran a
>> UNIANOVA analysis (i.e., treating this as a completely between-subjects
>> design) which came out fine.  Below is the syntax:
>>
>> UNIANOVA
>>  RT_msec by word related present
>>   /method=sstype(3)
>>   /intercept=include
>>   /print=descriptive homo etasq
>>   /emmeans=tables(related)
>>   /emmeans=tables(word)
>>   /emmeans=tables(present)
>>   /emmeans=tables(word*related)
>>   /emmeans=tables(related*present)
>>   /emmeans=tables(word*present)
>>   /emmeans=tables(word*related*present)
>>   /Design.
>>
>> So, to get back to the original question:  what is the correct way to
>> specify a completely within-subjects design in the MIXED procedure
>> in order to duplicate a GLM analysis of the same design?
>>
>> -Mike Palij
>> New York University
>> mp26@nyu.edu
>>

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).