# SAS Repeated Measure Analysis – PROC GLM Procedure

Job-ready Online Courses: Knowledge Awaits â€“ Click to Access!

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.

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

Example- SAS Repeated Measure Analysis & PROC GLM Procedure

Output -1 SAS Repeated Measure Analysis & PROC GLM Procedure

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.

You give me 15 seconds I promise you best tutorials