Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

SAS repeated measurement analysis


May 27, 2021 SAS


Table of contents


Repeated measurement analysis is used when measuring all members of a random sample under multiple different conditions. M easurements must be made in turn when there are many different conditions in the sample. I n this case, it is not appropriate to use standard ANOVA because it cannot model repeated measurements of correlations between different conditions. T he difference between several different conditions should be measured clearly and repeatedly. T he samples were repeatedly measured, and each test tested the characteristics of the same sample under different conditions.

The SAS PROC GLM is used for repeated measurement analysis.

Syntactic

The basic syntax for PROC GLM in SAS is:

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

The following is a description of the parameters used:

  • dataset is the name of the dataset.
  • CLASS gives variables that are used as classification variables.
  • MODEL uses some variables in the data set to define the model to fit.
  • REPEATED defines the number of repeated measurements per group to test this assumption.

Cases

Consider the following example, where we have two groups of people who are tested for drug effects. F or each of the four drug types tested, the reaction time of each person was recorded. F ive trials were conducted on each group to see the intensity of the correlation between the effects of the four drug types.

DATA temp;
  INPUT person group $ r1 r2 r3 r4;
CARDS;
1 A  2  1  6  5
2 A  5  4 11  9
3 A  6 14 12 10
4 A  2  4  5  8
5 A  0  5 10  9
6 B  9 11 16 13
7 B  12 4 13 14
8 B  15 9 13  8
9 B  6  8 12  5
10 B 5  7 11  9
;
RUN;

PROC PRINT DATA=temp ;
RUN;

 PROC GLM DATA=temp;
  CLASS group;
  MODEL r1-r4 = group / NOUNI ;
  REPEATED trial 5;
RUN;

When we execute the code above, we get the following results:

SAS repeated measurement analysis