BookmarkSubscribeRSS Feed
madpumpkinpie
Calcite | Level 5

Hi there, 

I am a beginner of SAS and only using "Auto-complete" function (choosing what to do from options in Task tub). 

I wanted to conduct one-way repeated measures ANOVA but cannot find the option. I can find one-way ANOVA though. 

 

I heard, in SPSS, they automatically choose the most suitable test when we choose repeated ANOVA option.

In SAS, do we have to choose the appropriate test for repeated measures by ourselves? If so, could you tell me the name of those tests? 

 

Thank you, 

6 REPLIES 6
Ksharp
Super User

If you want do REPEAT measure analysis, Check PROC MIXED or PROC GLIMMIX .

madpumpkinpie
Calcite | Level 5

Thank you for replying, 

Could you tell me where exactly I can find them? Please find the attachments... I tried to do my best, but sorry if you find them too rough to see Man Sad

Also I appreciate if you can tell me the difference like when to use which model. 

 

Thank you! Picture1Picture1Cont'dCont'd

 

Ksharp
Super User

Sorry. I think you should write some code .Search PROC MIXED / GLIMMIX at support.sas.com 

madpumpkinpie
Calcite | Level 5

Thank you

BrianGaines
SAS Employee

For a repeated measures analysis, please see the Mixed Models task near the bottom of the Statistics category.  When specifying the model effects in the MODEL tab, there is an option to "Add Repeated."  

 

For example, there is a repeated measures example in the PROC MIXED documentation that can be done using the Mixed Models task.  Here are the steps to re-create the first part of that example:

 

1. Use the code from the example to create the PR dataset.

2. Open the Mixed Models task

3. DATA tab --> DATA --> Select "WORK.PR"

4. DATA tab --> ROLES --> Dependent variable: select "y"

5. DATA tab --> ROLES --> Explanatory Variables --> Classification variables: select "Gender" and "Person"

6. DATA tab --> ROLES --> Explanatory Variables --> Continuous variables: select "Age"

7. MODEL tab --> Fixed Effects --> Edit --> Select both "Age" and "Gender" (using the Ctrl key) --> Select "Two-way factorial" under "Standard Models" to add Age, Gender, and Age*Gender effects --> Click OK to close the Fixed Effects Builder 

8.  MODEL tab --> Click "Add Repeated" --> Repeated Effects --> "Edit" --> Click the "Subject effect" radio button --> Select "Person" --> Click "Add" under "Single Effects" --> Click "Covariance Structures" under "Subject effect" --> Select "Unstructured" from the drop-down list --> Click OK twice to close the Covariance Structures dialog and the Repeated Effects Builder

9.  OPTIONS tab --> METHODS --> Estimation method: select "Maximum likelihood"

10.  OPTIONS tab --> STATISTICS --> Select statistics to display: select "Default and additional statistics" --> Tests --> Select "Standard errors and Wald test of covariance parameters"

11.  OPTIONS tab --> STATISTICS --> Under "Default and additional statistics" --> Parameter Estimates --> Fixed Effects --> Select "Show parameter estimates"

12.  OPTIONS tab --> STATISTICS --> Under "Default and additional statistics" --> Parameter Estimates --> Repeated Effect --> Select "Estimated R matrix"

13.  The code produced by the task is almost identical to the code in the example, outside of plot options and specifying the significance level alpha (which has a default of 0.05):

mixedModelsTask.jpg

 

 

 

 

 

14.  Run the task and compare the results with the results from the documentation (they should match).

 

Hopefully these instructions provide you with a solid foundation and you can now use the Mixed Models task to suit your needs.

madpumpkinpie
Calcite | Level 5

Thank you for the very detailed exploration!!

However, it does not allow me to add more than one dependent variable (MANOVA).

Variables:

ID  Gender(1or2)  Treatment (1, 2, 3)  EI  WI

*EI energy intake (kcal), WI water intake (g)

 

I would like to examine the effect of two variables (treatment; within subjects, gender; between subjects) on each of two dependent variables (EI kcal and WI). I want to put the two dependent variables in the same analysis as there is a significant correlation between  them.

I posted a question about this but it has not been solved yet.

https://communities.sas.com/t5/SAS-Statistical-Procedures/PROC-GLM-repeated-measures-one-class-two-m...

 

Could you tell me how I can conduct this analysis using the task (or code)?

 

Thank you,

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 3041 views
  • 0 likes
  • 3 in conversation