Repeated Measures ANOVA using mixed models

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

Repeated Measures ANOVA using mixed models

Joost van Ginkel
Repeated Measures ANOVA using mixed models

Dear list,

I've been trying to reproduce the results of a full factorial repeated measures ANOVA with two within subjects factors (A and B) and Dependent as the dependent variable, using mixed models. I restructured the data into a new dataset with Casenumber as an indicator variable for the subjects. It took me a long time to figure out how the results could be reproduced but now I've finally found a way to do it, were it not that the final solution doesn’t converge. The F- and p-values are exactly the same and the number of degrees of freedom are almost the same; they only differ in the 12th decimal place (and are consequently no integers) from the ANOVA solution. I've tried several things to achieve convergence: I've increased the number of iterations up to 100.000 (which didn't work), and I've used another dataset with the same variables but with more cases (which didn’t work either). The syntax code that I used is:

MIXED Dependent BY A B
  /CRITERIA=CIN(95) MXITER(100000) MXSTEP(5) SCORING(1) SINGULAR(0.000000000001) HCONVERGE(0,
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=A B A*B | SSTYPE(3)
  /METHOD=REML
  /PRINT=COVB  SOLUTION
  /RANDOM=INTERCEPT A B A*B | SUBJECT(Casenumber) COVTYPE(VC).

Can anybody tell me why this model doesn't converge? I hope someone can help me out. Thank you very much!

Best regards,

Joost van Ginkel

Joost R. van Ginkel, PhD
Leiden University
Faculty of Social and Behavioural Sciences
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.

**********************************************************************

 

Reply | Threaded
Open this post in threaded view
|

Re: Repeated Measures ANOVA using mixed models

Maguin, Eugene
Joost,
I'm curious why you did not use the repeated subcommand that is part of the
mixed command.

Gene Maguin



________________________________

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Ginkel, Joost van
Sent: Friday, October 15, 2010 6:04 AM
To: [hidden email]
Subject: Repeated Measures ANOVA using mixed models



Dear list,

I've been trying to reproduce the results of a full factorial repeated
measures ANOVA with two within subjects factors (A and B) and Dependent as
the dependent variable, using mixed models. I restructured the data into a
new dataset with Casenumber as an indicator variable for the subjects. It
took me a long time to figure out how the results could be reproduced but
now I've finally found a way to do it, were it not that the final solution
doesn't converge. The F- and p-values are exactly the same and the number of
degrees of freedom are almost the same; they only differ in the 12th decimal
place (and are consequently no integers) from the ANOVA solution. I've tried
several things to achieve convergence: I've increased the number of
iterations up to 100.000 (which didn't work), and I've used another dataset
with the same variables but with more cases (which didn't work either). The
syntax code that I used is:

MIXED Dependent BY A B
  /CRITERIA=CIN(95) MXITER(100000) MXSTEP(5) SCORING(1)
SINGULAR(0.000000000001) HCONVERGE(0,
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=A B A*B | SSTYPE(3)
  /METHOD=REML
  /PRINT=COVB  SOLUTION
  /RANDOM=INTERCEPT A B A*B | SUBJECT(Casenumber) COVTYPE(VC).

Can anybody tell me why this model doesn't converge? I hope someone can help
me out. Thank you very much!

Best regards,

Joost van Ginkel

Joost R. van Ginkel, PhD
Leiden University
Faculty of Social and Behavioural Sciences
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 using mixed models

Joost van Ginkel
Dear Gene,

Thank you very much for your reply. The reason why I didn't use it was
that I came to this model by trial and error. I'm sure that in the
process I must have tried the repeated subcommand as well, probably
coming to the conclusion that that didn't work either. To be sure that
this didn't work I tried repeated subcommand after you made this
suggestion, leaving out the random effects of A, B, and A*B. However,
this did not reproduce the results from repeated measures ANOVA (The
values of the degrees of freedom differed), as I expected. When I put
these random effects back in the model and also used the repeated
subcommand, the output provided no degrees of freedom and p-values. So
if this repeated subcommand is supposed to model the dependence among
measurements, then why doesn't it reproduce the results of repeated
measures ANOVA?

Best regards,

Joost van Ginkel


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


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Gene Maguin
Sent: Friday, October 15, 2010 3:15 PM
To: [hidden email]
Subject: Re: Repeated Measures ANOVA using mixed models

Joost,
I'm curious why you did not use the repeated subcommand that is part of
the mixed command.

Gene Maguin



________________________________

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Ginkel, Joost van
Sent: Friday, October 15, 2010 6:04 AM
To: [hidden email]
Subject: Repeated Measures ANOVA using mixed models



Dear list,

I've been trying to reproduce the results of a full factorial repeated
measures ANOVA with two within subjects factors (A and B) and Dependent
as the dependent variable, using mixed models. I restructured the data
into a new dataset with Casenumber as an indicator variable for the
subjects. It took me a long time to figure out how the results could be
reproduced but now I've finally found a way to do it, were it not that
the final solution doesn't converge. The F- and p-values are exactly the
same and the number of degrees of freedom are almost the same; they only
differ in the 12th decimal place (and are consequently no integers) from
the ANOVA solution. I've tried several things to achieve convergence:
I've increased the number of iterations up to 100.000 (which didn't
work), and I've used another dataset with the same variables but with
more cases (which didn't work either). The syntax code that I used is:

MIXED Dependent BY A B
  /CRITERIA=CIN(95) MXITER(100000) MXSTEP(5) SCORING(1)
SINGULAR(0.000000000001) HCONVERGE(0,
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=A B A*B | SSTYPE(3)
  /METHOD=REML
  /PRINT=COVB  SOLUTION
  /RANDOM=INTERCEPT A B A*B | SUBJECT(Casenumber) COVTYPE(VC).

Can anybody tell me why this model doesn't converge? I hope someone can
help me out. Thank you very much!

Best regards,

Joost van Ginkel

Joost R. van Ginkel, PhD
Leiden University
Faculty of Social and Behavioural Sciences 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

=====================
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 using mixed models

Bruce Weaver
Administrator
Hi Joost.  I don't think I've ever tried a two-factor repeated measures ANOVA design with MIXED, but here is a file in which I explored various ways of analyzing a one-factor model.  It might give you some ideas.   Notice, for example, that I had to change the covariance to from CS to UN to get standard errors (for the EMMEANS) that matched those produced by GLM.

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

HTH.


Ginkel, Joost van wrote
Dear Gene,

Thank you very much for your reply. The reason why I didn't use it was
that I came to this model by trial and error. I'm sure that in the
process I must have tried the repeated subcommand as well, probably
coming to the conclusion that that didn't work either. To be sure that
this didn't work I tried repeated subcommand after you made this
suggestion, leaving out the random effects of A, B, and A*B. However,
this did not reproduce the results from repeated measures ANOVA (The
values of the degrees of freedom differed), as I expected. When I put
these random effects back in the model and also used the repeated
subcommand, the output provided no degrees of freedom and p-values. So
if this repeated subcommand is supposed to model the dependence among
measurements, then why doesn't it reproduce the results of repeated
measures ANOVA?

Best regards,

Joost van Ginkel


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


-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Gene Maguin
Sent: Friday, October 15, 2010 3:15 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: Repeated Measures ANOVA using mixed models

Joost,
I'm curious why you did not use the repeated subcommand that is part of
the mixed command.

Gene Maguin



________________________________

From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Ginkel, Joost van
Sent: Friday, October 15, 2010 6:04 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Repeated Measures ANOVA using mixed models



Dear list,

I've been trying to reproduce the results of a full factorial repeated
measures ANOVA with two within subjects factors (A and B) and Dependent
as the dependent variable, using mixed models. I restructured the data
into a new dataset with Casenumber as an indicator variable for the
subjects. It took me a long time to figure out how the results could be
reproduced but now I've finally found a way to do it, were it not that
the final solution doesn't converge. The F- and p-values are exactly the
same and the number of degrees of freedom are almost the same; they only
differ in the 12th decimal place (and are consequently no integers) from
the ANOVA solution. I've tried several things to achieve convergence:
I've increased the number of iterations up to 100.000 (which didn't
work), and I've used another dataset with the same variables but with
more cases (which didn't work either). The syntax code that I used is:

MIXED Dependent BY A B
  /CRITERIA=CIN(95) MXITER(100000) MXSTEP(5) SCORING(1)
SINGULAR(0.000000000001) HCONVERGE(0,
    ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED=A B A*B | SSTYPE(3)
  /METHOD=REML
  /PRINT=COVB  SOLUTION
  /RANDOM=INTERCEPT A B A*B | SUBJECT(Casenumber) COVTYPE(VC).

Can anybody tell me why this model doesn't converge? I hope someone can
help me out. Thank you very much!

Best regards,

Joost van Ginkel

Joost R. van Ginkel, PhD
Leiden University
Faculty of Social and Behavioural Sciences 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
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

=====================
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 using mixed models

Joost van Ginkel
Dear Bruce,

Thank you very much, this may be very helpful.

Best regards,

Joost van Ginkel


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


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Bruce Weaver
Sent: Friday, October 15, 2010 8:34 PM
To: [hidden email]
Subject: Re: Repeated Measures ANOVA using mixed models

Hi Joost.  I don't think I've ever tried a two-factor repeated measures
ANOVA design with MIXED, but here is a file in which I explored various
ways of
analyzing a one-factor model.  It might give you some ideas.   Notice,
for
example, that I had to change the covariance to from CS to UN to get
standard errors (for the EMMEANS) that matched those produced by GLM.

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

HTH.



Ginkel, Joost van wrote:
>
> Dear Gene,
>
> Thank you very much for your reply. The reason why I didn't use it was

> that I came to this model by trial and error. I'm sure that in the
> process I must have tried the repeated subcommand as well, probably
> coming to the conclusion that that didn't work either. To be sure that

> this didn't work I tried repeated subcommand after you made this
> suggestion, leaving out the random effects of A, B, and A*B. However,
> this did not reproduce the results from repeated measures ANOVA (The
> values of the degrees of freedom differed), as I expected. When I put
> these random effects back in the model and also used the repeated
> subcommand, the output provided no degrees of freedom and p-values. So

> if this repeated subcommand is supposed to model the dependence among
> measurements, then why doesn't it reproduce the results of repeated
> measures ANOVA?
>
> Best regards,
>
> Joost van Ginkel
>
>
> Joost R. van Ginkel, PhD
> Leiden University
> Faculty of Social and Behavioural Sciences PO Box 9555 2300 RB Leiden
> The Netherlands
> Tel: +31-(0)71-527 3620
> Fax: +31-(0)71-527 1721
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf
> Of Gene Maguin
> Sent: Friday, October 15, 2010 3:15 PM
> To: [hidden email]
> Subject: Re: Repeated Measures ANOVA using mixed models
>
> Joost,
> I'm curious why you did not use the repeated subcommand that is part
> of the mixed command.
>
> Gene Maguin
>
>
>
> ________________________________
>
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf
> Of Ginkel, Joost van
> Sent: Friday, October 15, 2010 6:04 AM
> To: [hidden email]
> Subject: Repeated Measures ANOVA using mixed models
>
>
>
> Dear list,
>
> I've been trying to reproduce the results of a full factorial repeated

> measures ANOVA with two within subjects factors (A and B) and
> Dependent as the dependent variable, using mixed models. I
> restructured the data into a new dataset with Casenumber as an
> indicator variable for the subjects. It took me a long time to figure
> out how the results could be reproduced but now I've finally found a
> way to do it, were it not that the final solution doesn't converge.
> The F- and p-values are exactly the same and the number of degrees of
> freedom are almost the same; they only differ in the 12th decimal
> place (and are consequently no integers) from the ANOVA solution. I've
tried several things to achieve convergence:

> I've increased the number of iterations up to 100.000 (which didn't
> work), and I've used another dataset with the same variables but with
> more cases (which didn't work either). The syntax code that I used is:
>
> MIXED Dependent BY A B
>   /CRITERIA=CIN(95) MXITER(100000) MXSTEP(5) SCORING(1)
> SINGULAR(0.000000000001) HCONVERGE(0,
>     ABSOLUTE) LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
>   /FIXED=A B A*B | SSTYPE(3)
>   /METHOD=REML
>   /PRINT=COVB  SOLUTION
>   /RANDOM=INTERCEPT A B A*B | SUBJECT(Casenumber) COVTYPE(VC).
>
> Can anybody tell me why this model doesn't converge? I hope someone
> can help me out. Thank you very much!
>
> Best regards,
>
> Joost van Ginkel
>
> Joost R. van Ginkel, PhD
> Leiden University
> Faculty of Social and Behavioural Sciences 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
>
> =====================
> 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
>
>


-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Repeated-Measures-ANOVA-us
ing-mixed-models-tp3213446p3214288.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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