SAS Repeated Measure Analysis – PROC GLM Procedure

Keeping you updated with latest technology trends, Join DataFlair on Telegram

1. Objective

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.

SAS Repeated Measure Analysis

SAS Repeated Measure Analysis – PROC GLM Procedure

2. 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.

Let’s study about SAS Frequency Distribution Using SAS PROC FREQ

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

3. 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.

4. 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.

Let’s learn SAS Arithmetic Mean – SAS PROC MEANS 

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.

5. 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.

See Also – SAS One Way ANOVA 

For reference 

Leave a Reply

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.