BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
obrienfk
Calcite | Level 5

Hi all,

I'm conducting a mixed ANOVA. I have an independent groups variable (Group) with 2 levels and a repeated measures variable (Time) with 4 levels. I want to see if there's a main effect of Group, a main effect of Time and/or an interaction between the two.

In SPSS, this is simply done through the main ANOVA options. Because Group has only two levels, the analysis for the main effect of this variable is the same as doing a simple t-test. Indeed, in SPSS the exact same results come about for the Group part of the ANOVA as they do for a separate t-test (they both reveal Group to be non-significant).

In SAS, I have been using the PROC MIXED statement to conduct the a mixed ANOVA with this exact code (for a dataset in Long Format):


PROC MIXED DATA = MyData;

CLASS Time Group IDSubject;

  MODEL Score = Time Group Group*Time;

  REPEATED Time/ SUBJECT = IDSubject;

RUN;

What's interesting is that the when I run this code, group is found to be significant! When I run a t-test using SAS, the results (non-significant) are the same as the t-test in SPSS and the main effect analysis for group in the Mixed ANOVA in SPSS as well.

My question is, why am I getting a different result in the Mixed ANOVA in SAS compared with SPSS. I'm assuming it has something to do with different calculations since the PROC mixed seems to be used for other things like Multilevel modelling.

I'd appreciate any help.

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

I am not at all familiar with SPSS, but the difference between the t test and PROC MIXED is that the t test assumes the observations are independent while the mixed model accommodates correlation over time. By removing this source of variability, greater precision is obtained for the estimates and consequently significance is "found".

My suspicion about the mixed ANOVA in SPSS is that it is more like PROC GLM and how it accommodates random effects, partitioning sums of squares, rather than finding a (restricted) maximum likelihood solution.  Getting results similar to the t test approach would tend to support this, I think.

As far as the analysis in PROC MIXED, consider adding a type= option to the REPEATED statement that reflects the covariance structure of the data.  If the data are equally spaced in time, autoregressive structures are likely to fit the data better than the default variance components structure.  If not equally spaced in time, structures such as spatial power  are often appropriate.

Steve Denham

View solution in original post

4 REPLIES 4
SteveDenham
Jade | Level 19

I am not at all familiar with SPSS, but the difference between the t test and PROC MIXED is that the t test assumes the observations are independent while the mixed model accommodates correlation over time. By removing this source of variability, greater precision is obtained for the estimates and consequently significance is "found".

My suspicion about the mixed ANOVA in SPSS is that it is more like PROC GLM and how it accommodates random effects, partitioning sums of squares, rather than finding a (restricted) maximum likelihood solution.  Getting results similar to the t test approach would tend to support this, I think.

As far as the analysis in PROC MIXED, consider adding a type= option to the REPEATED statement that reflects the covariance structure of the data.  If the data are equally spaced in time, autoregressive structures are likely to fit the data better than the default variance components structure.  If not equally spaced in time, structures such as spatial power  are often appropriate.

Steve Denham

Doc_Duke
Rhodochrosite | Level 12

Second Steve's comment on GLM.  If you did the REPEATED statement in GLM (rather than MIXED), I'd suspect that you would get nearly identical results to SPSS.

obrienfk
Calcite | Level 5

Thank you both for your replies. Doc@Duke, I didn't actually realize that GLM in SAS could do repeated measures - that was the whole reason I was using mixed.

Steve, is it generally better to use this MIXED (because it "accommodates correlation over time") compared with GLM -or are there circumstances where a repeated measures (or mixed method) ANOVA should be carried out in PROC GLM?

I don't know much about "covariance structures of the data" -I'll have to look into it.

SteveDenham
Jade | Level 19

Personal preference--I would never do a repeated measures in time (longitudinal design) in GLM, as the restrictions on the covariance structure are not reflective of physical, biological or economical processes.  The sphericity assumption and the work-around Huynh-Feldt or Greenhouse-Geisser adjustments all assume an "exchangeable" structure--that the actual ordering of the time variables makes no difference in the error.  Advances in methodology mean that we do not have to make such simplifying assumptions.  For similar reasons, I would not use GLM for random effects analyses.

I use GLM for regression when there are class variables, and for multivariate ANOVA.  Otherwise, I use GLIMMIX--it handles almost everything available in MIXED, plus it can deal with non-normally distributed endpoints.

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2799 views
  • 8 likes
  • 3 in conversation