contrasts for interactions in repeated measures anova?

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

contrasts for interactions in repeated measures anova?

pjiman1
I wanted to know if there was syntax I could write to obtain contrast comparisons by time and by group for a repeated measures anova.

I have 6 waves, three groups. I want to know if it is possible to obtain a post-hoc or contrast to determine if, for example, the three groups are different at wave 3.

this syntax:
GLM RubricW1 RubricW2 RubricW3 RubricW4 RubricW5 RubricW6 BY enrollgp
  /WSFACTOR=Wave 6 Difference
  /METHOD=SSTYPE(3)
  /POSTHOC=enrollgp(TUKEY BONFERRONI)
  /EMMEANS=TABLES(OVERALL)
  /EMMEANS=TABLES(enrollgp)
  /EMMEANS=TABLES(Wave)
  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(enrollgp) COMPARE(Wave)  
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /WSDESIGN=Wave
  /DESIGN=enrollgp.

gives me a post-hoc by group, contrasts for wave, and contrast for wave for each group.
but can I get a contrast/post-hoc if I want to determine if the groups are different at certain waves?
at this point, I would conduct an ANOVA and select only the data pertaining to that wave. is there another option I could use in repeated measures ANOVA?

thanks in advance.
Pjiman1
Reply | Threaded
Open this post in threaded view
|

Re: contrasts for interactions in repeated measures anova?

Zdaniuk, Bozena-3
The subcommand
  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(enrollgp)
should give you comparison of each enrollgp group contrast separately in each wave. Are you saying this command is not giving you what you want?
bozena
________________________________________
From: SPSSX(r) Discussion [[hidden email]] on behalf of pjiman1 [[hidden email]]
Sent: Friday, March 15, 2013 10:29 PM
To: [hidden email]
Subject: contrasts for interactions in repeated measures anova?

I wanted to know if there was syntax I could write to obtain contrast
comparisons by time and by group for a repeated measures anova.

I have 6 waves, three groups. I want to know if it is possible to obtain a
post-hoc or contrast to determine if, for example, the three groups are
different at wave 3.

this syntax:
GLM RubricW1 RubricW2 RubricW3 RubricW4 RubricW5 RubricW6 BY enrollgp
  /WSFACTOR=Wave 6 Difference
  /METHOD=SSTYPE(3)
  /POSTHOC=enrollgp(TUKEY BONFERRONI)
  /EMMEANS=TABLES(OVERALL)
  /EMMEANS=TABLES(enrollgp)
  /EMMEANS=TABLES(Wave)
  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(enrollgp) COMPARE(Wave)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /WSDESIGN=Wave
  /DESIGN=enrollgp.

gives me a post-hoc by group, contrasts for wave, and contrast for wave for
each group.
but can I get a contrast/post-hoc if I want to determine if the groups are
different at certain waves?
at this point, I would conduct an ANOVA and select only the data pertaining
to that wave. is there another option I could use in repeated measures
ANOVA?

thanks in advance.
Pjiman1



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/contrasts-for-interactions-in-repeated-measures-anova-tp5718728.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
Reply | Threaded
Open this post in threaded view
|

Re: contrasts for interactions in repeated measures anova?

pjiman1
to Bozena,
yes, the command only gives me a contrast across waves for each group.

what I am looking for are comparisons within groups at each wave, perhaps even across waves and group.
 
at this point, I'm doing simple ANOVA's for group at each wave. but if repeated measures SPSS has a syntax where I can obtain that information, that would be great.
thanks.
pjiman1

Reply | Threaded
Open this post in threaded view
|

Re: contrasts for interactions in repeated measures anova?

Ryan
Although I have never tried it within the framework of a MIXED ANOVA, it should be possible to perform all the contrasts you have mentioned using the LMATRIX sub-command of the GLM procedure

Another option would be to use the TEST sub-command of the linear MIXED modeling procedure, given various advantages (e.g., handling of missing data, specification of residual variance-covariance matrices). But proper use of this procedure requires restructuring of the data set, along with a steep learning curve.

Ryan

On Mar 23, 2013, at 12:36 PM, pjiman1 <[hidden email]> wrote:

> to Bozena,
> yes, the command only gives me a contrast across waves for each group.
>
> what I am looking for are comparisons within groups at each wave, perhaps
> even across waves and group.
>
> at this point, I'm doing simple ANOVA's for group at each wave. but if
> repeated measures SPSS has a syntax where I can obtain that information,
> that would be great.
> thanks.
> pjiman1
>
>
>
>
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/contrasts-for-interactions-in-repeated-measures-anova-tp5718728p5719025.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
Reply | Threaded
Open this post in threaded view
|

Re: contrasts for interactions in repeated measures anova?

pjiman1
thank you, it sounds like it is not a common practice to do what I'm asking and that simple ANOVA contrasts for each wave would be sufficient for the comparisons I want to make. that's helpful to know. sometimes knowing that a simple solution is not available can be a good thing.

much appreciated
pjiman1
Reply | Threaded
Open this post in threaded view
|

Re: contrasts for interactions in repeated measures anova?

Bruce Weaver
Administrator
In reply to this post by pjiman1
I don't have SPSS on this machine, so cannot test, but can you have COMPARE more than once on the same EMMEANS sub-command?  You have this:

  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(enrollgp) COMPARE(Wave)

I wonder if you need this:

  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(enrollgp)
  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(Wave)

The second of these will generate all pair-wise comparisons of waves for each group separately.  I think that is what you are describing below, where you say you want "comparisons within groups at each wave".

HTH.


pjiman1 wrote
to Bozena,
yes, the command only gives me a contrast across waves for each group.

what I am looking for are comparisons within groups at each wave, perhaps even across waves and group.
 
at this point, I'm doing simple ANOVA's for group at each wave. but if repeated measures SPSS has a syntax where I can obtain that information, that would be great.
thanks.
pjiman1
--
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: contrasts for interactions in repeated measures anova?

pjiman1
worth a shot, much appreciation for your post.
Pjiman1
Reply | Threaded
Open this post in threaded view
|

Re: contrasts for interactions in repeated measures anova?

Bruce Weaver
Administrator
In reply to this post by Bruce Weaver
I now have SPSS, and have done some testing.  Interestingly, having two COMPAREs on one EMMEANS line does not make it crash, but it looks like only those comparisons associated with the second one appear in the output.  Here's an example using one of the "testmarket.sav" sample file.

new file.
dataset close all.
* Modify path for GET FILE as needed.
get file = "C:\SPSSdata\testmarket.sav".

SORT CASES BY locid week.
CASESTOVARS
  /ID=locid
  /INDEX=week
  /GROUPBY=VARIABLE.

GLM sales.1 to sales.4 BY  mktsize
  /WSFACTOR=Week 4 Difference
  /METHOD=SSTYPE(3)
  /POSTHOC=mktsize(TUKEY BONFERRONI)
  /EMMEANS=TABLES(OVERALL)
  /EMMEANS=TABLES(mktsize)
  /EMMEANS=TABLES(Week)
  /EMMEANS=TABLES(mktsize*Week) COMPARE(mktsize) COMPARE(Week)  
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /WSDESIGN=Week
  /DESIGN=mktsize.

* For this model, I get pairwise comparisons of Weeks within
* each level of Market Size, but no comparisons of Market Sizes
* within each Week.  I.e., I get the COMPARE(Week) comparisons only.
* Notice that the final COMPARE is the one that is used.
* The OP had this EMMEANS sub-command:
*  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(enrollgp) COMPARE(Wave)  
* and complained that the COMPARE(engrollgp) comparions were missing.
* To get those comparisons, the OP needs separate EMMEANS lines:
*  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(enrollgp)
*  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(Wave)  
.

GLM sales.1 to sales.4 BY  mktsize
  /WSFACTOR=Week 4 Difference
  /METHOD=SSTYPE(3)
  /POSTHOC=mktsize(TUKEY BONFERRONI)
  /EMMEANS=TABLES(OVERALL)
  /EMMEANS=TABLES(mktsize)
  /EMMEANS=TABLES(Week)
  /EMMEANS=TABLES(mktsize*Week) COMPARE(Week)  
  /EMMEANS=TABLES(mktsize*Week) COMPARE(mktsize)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /WSDESIGN=Week
  /DESIGN=mktsize.

* For this model, I get both the COMPARE(Week) and
* the COMPARE(mktsize) comparisons.

HTH.


Bruce Weaver wrote
I don't have SPSS on this machine, so cannot test, but can you have COMPARE more than once on the same EMMEANS sub-command?  You have this:

  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(enrollgp) COMPARE(Wave)

I wonder if you need this:

  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(enrollgp)
  /EMMEANS=TABLES(enrollgp*Wave) COMPARE(Wave)

The second of these will generate all pair-wise comparisons of waves for each group separately.  I think that is what you are describing below, where you say you want "comparisons within groups at each wave".

HTH.


pjiman1 wrote
to Bozena,
yes, the command only gives me a contrast across waves for each group.

what I am looking for are comparisons within groups at each wave, perhaps even across waves and group.
 
at this point, I'm doing simple ANOVA's for group at each wave. but if repeated measures SPSS has a syntax where I can obtain that information, that would be great.
thanks.
pjiman1
--
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: contrasts for interactions in repeated measures anova?

Ryan
In reply to this post by pjiman1
I haven't followed this thread closely, but I would like to point out that when one observes a significant interaction for a MIXED ANOVA (group-X-time), it is not uncommon to evaluate whether the mean difference from time i to time j is sig. different between groups. For example, you might find that group 1 improved significantly more so from time 1 to time 2 as compared to the second group. If you have access to an ANOVA/regression textbook, you're bound to find a section on this topic. Also, if you search the SPSS-L archives, I think you'll come across a post or two on how to perform such contrasts using the TEST sub-command of the MIXED procedure. It really is just a matter of manipulating the coefficient matrix L.
 
Example: For a 2X4 design (2 groups measured 4 times), to test whether the there is a sig. diff between groups on mean change from t1 to t2, the coefficients would be calculated as follows:
 
(1 - 1  0  0) - (1  -1   0  0)
 
1 -1  0  0    -1  1  0  0

and the code would look something like this (depending on the procedure/sub-command):
 
group*time  1 -1 0 0 -1 1 0 0
 
HTH.
 
Ryan
On Sun, Mar 24, 2013 at 11:50 AM, pjiman1 <[hidden email]> wrote:
thank you, it sounds like it is not a common practice to do what I'm asking
and that simple ANOVA contrasts for each wave would be sufficient for the
comparisons I want to make. that's helpful to know. sometimes knowing that a
simple solution is not available can be a good thing.

much appreciated
pjiman1




--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/contrasts-for-interactions-in-repeated-measures-anova-tp5718728p5719045.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