SAS Repeated Measure Analysis – PROC GLM Procedure

FREE Online Courses: Transform Your Career – Enroll for Free!

We looked at t-tests, correlation, regression, Bland-Altman analysis, and chi-square test in the previous SAS tutorials, today we will look at another important process called SAS Repeated Measure Analysis and SAS Proc GLM Procedure.

At last, we will see how Repeated measure analysis can perform in SAS Programming Language.

So, let’s start with SAS Repeated Measure Analysis.

What is SAS Repeated Measure Analysis

Repeated measures data comes from experiments where you take observations repeatedly over time. Under SAS repeated measures analysis (experiment), experimental units observe at multiple points in time.

So, instead of looking at an observation at one point in time, we will look at data from more than one point in time. With this type of data we are looking at only a single response variable but measured over time.

SAS Repeated Measure Analysis can use in the univariate as well as a multivariate setting.

The PROC GLM Procedure

In SAS PROC GLM use to carry out repeated measure analysis.

A Syntax of PROC GLAM Procedure-

PROC GLM DATA=dataset;
  CLASS variable;
  MODEL variables = group / NOUNI ;
  REPEATED TRIAL n;

Here Model tells the model to be fit using certain variables form the dataset. REPEATED tells the number of repeated measures we wish to perform for each group to test the hypothesis.

Applying Repeated Measure Analysis in SAS

Consider the example below in which we have two groups of people subjected to test their shopping preference. The reaction time of each person is recorded for each of the three shopping preferences tested.

Here 5 trials are done for each group of people to see the strength of correlation between the effect of the three shopping preferences.

Example of SAS Repeated Measure Analysis-

DATA XYZ;
  INPUT EMPLOYEE group $ a1 a2 a3 ;
CARDS;
1   B    3    1    60
2   B    6    4    23
3   B    2    14   34
4   B    1    4    40
5   B    0    5    45
6   A    41   1    56
7   A    22   4    89
8   A    45   9    23 
9   A    60   8    22 
10  A    5    7    10 
;
RUN;
 PROC PRINT DATA=XYZ ;
RUN;
  PROC GLM DATA=XYZ;
  CLASS group;
  MODEL a1-a3 = group / NOUNI ;
  REPEATED trial 5;
RUN;

Here we use the NOUNI option with a multivariate or SAS repeated measures analysis of variance when you do not need the standard univariate output.

SAS Repeated Measure Analysis

Example- SAS Repeated Measure Analysis & PROC GLM Procedure

 

SAS Repeated Measure Analysis

Output -1 SAS Repeated Measure Analysis & PROC GLM Procedure

 

SAS Repeated Measure Analysis

This was all about SAS Repeated Measure Analysis Tutorial. Hope you like our explanation of SAS PROC GLAM Procedure.

Conclusion

Hence, we hope you all understood what is SAS repeated measure analysis and SAS PROC GLAM Procedure. In conclusion, we saw how can we create repeated measure analysis in SAS Programming Language.

Furthermore, if you have any query feel free to ask in a comment section and stay tuned to learn more interesting things in SAS.

If you are Happy with DataFlair, do not forget to make us happy with your positive feedback on Google

follow dataflair on YouTube

1 Response

  1. Udoh, Stanislaus says:

    I want to analyze a data set from animal breeding experiment using SAS. the classification variables are sire and dam, the response variable is body weight at 16 weeks and the design is nested. can SAS PROC GLM or SAS PROC MIXED handle this analysis?. how can the data be entered for the analysis?.

Leave a Reply

Your email address will not be published. Required fields are marked *