Repeated Measures and Related Designs

I. General introduction

  1. Definition: Repeated measures designs utilize the same subject for each of the treatment under study.[1]
  1. Examples

(1). 15 test markets are to be used to study each of two different advertising campaigns. In each test market, the order of the two campaigns will be randomized, with a sufficient time lapse between the two campaigns so that the effects of the initial campaign will not carry over into the second campaign. The subjects in this study are the test markets.

(2). 200 persons who have persistent migraine headaches are each to be given two different drugs and a placebo, for two weeks each, with the order of the drugs randomized for each person. The subject in the study are the persons with migraine headache.

(3). In a weight loss study, 100 overweight persons are to be given the same diet and their weights measured at the end of each week for 12 weeks to assess the weight loss over time. Here the subjects are the overweight persons, who are observed repeatedly to provide information about the effects of a single treatment over time.

  1. Advantages and disadvantages.

Advantages:

(1). This design provide good precision for comparing treatments because all sources of variability between subjects are excluded from the experimental error. Only variation within subjects enters the experimental error, since any two treatments can be compared directly for each subject.

(2). This design economizes on subjects.

Disadvantages:

(1). Order effect. It is connected with the position in the treatment order.

Randomization to eliminate order effect.

(2). Carryover effect. It is connected with the preceding treatment or treatments.

Allowing sufficient time between treatments reduces the carryover effect.

Single-factor experiments

with repeated measures on all treatments

  1. General notes.

Almost always, the subjects in repeated measures designs are viewed as a random sample from a population. So we will assume the effects of subjects to be random.

  1. Layout for single-factor repeated measures design (n=5, r=4)

Subject / Treatment order
1 2 3 4
1 / T4 / T3 / T2 / T1
2 / T3 / T4 / T1 / T2
3 / T4 / T3 / T1 / T2
4 / T2 / T1 / T4 / T3
5 / T1 / T2 / T4 / T3
  1. Data structure of the design

Subject / Treatment
1 2 3 4
1
2
3
4
5 / Y11 / Y12 / Y13 / Y14
Y21 / Y22 / Y23 / Y24
Y31 / Y32 / Y33 / Y34
Y41 / Y42 / Y43 / Y44
Y51 / Y52 / Y53 / Y54
  1. model

Where : the grand mean;

: main effect of subject, independent with ;

: main effect of treatment, subject to ;

: error, independent with ;

and are independent..

  1. ANOVA table

Source of variation / SS / DF / MSE / E(MSE)
Subjects / SSS / n-1 / SSS/n-1 /
Treatments / SSTR / r-1 / SSTR/r-1 /
Error / SSTR.S / (r-1)(n-1) / SSTR.S/(r-1)(n-1) /
Total / SSTO / nr-1

Where

SSTO=; SSS=;

SSTR=; SSTR.S=;

  1. Evaluation of appropriateness of repeated measures model

Consider the residuals:

.

  1. SAS Code

Example: In a wine judging competition, four wines of the same vintage were judged by six experienced judges. Each judge tasted the wines in a blind fashion. The order of the wine presentation was randomized independently for each judge. To reduce carryover and other interference effects, the judges did not drink the wines and rinsed their mouths thoroughly between tastings. Each wine was scored on a 40-point scale. The data for this competition are presented in the following table.

Judge (i) / Wine (j)
1 / 2 / 3 / 4
1 / 20 / 24 / 28 / 28
2 / 15 / 18 / 23 / 24
3 / 18 / 19 / 24 / 23
4 / 26 / 26 / 30 / 30
5 / 22 / 24 / 28 / 26
6 / 19 / 21 / 27 / 25

We want to testing the treatment (wines) effects.

SAS program:

DATA WINES;

INPUT JUDGE $ WINE $ SCORE @@;

DATALINES;

J1W120 J1W224 J1W328

J1W428 J2W115 J2W218

J2W323 J2W424 J3W118

J3W219 J3W323 J3W424

J4W126 J4W226 J4W330

J4W430 J5W122 J5W224

J5W328 J5W426 J6W119

J6W221 J6W327 J6W425

;

RUN;

PROCGLMDATA=WINES;

CLASS JUDGE WINE;

MODEL SCORE=JUDGE WINE;

RANDOM JUDGE;

RUN;

PROCMIXEDDATA=WINES;

CLASS JUDGE WINE;

MODEL SCORE=WINE;

RANDOM JUDGE;

RUN;

QUIT;

The results are:

Class Level Information

Class Levels Values

JUDGE 6 J1 J2 J3 J4 J5 J6

WINE 4 W1 W2 W3 W4

Number of Observations Read 24

Number of Observations Used 24

Dependent Variable: SCORE

Sum of

Source DF Squares Mean Square F Value Pr > F

Model 8 356.3333333 44.5416667 39.30 <.0001

Error 15 17.0000000 1.1333333

Corrected Total 23 373.3333333

R-Square Coeff Var Root MSE SCORE Mean

0.954464 4.498231 1.064581 23.66667

Source DF Type I SS Mean Square F Value Pr > F

JUDGE 5 173.3333333 34.6666667 30.59 <.0001

WINE 3 183.0000000 61.0000000 53.82 <.0001

Source DF Type III SS Mean Square F Value Pr > F

JUDGE 5 173.3333333 34.6666667 30.59 <.0001

WINE 3 183.0000000 61.0000000 53.82 <.0001

Source Type III Expected Mean Square

JUDGE Var(Error) + 4 Var(JUDGE)

WINE Var(Error) + Q(WINE)

The Mixed Procedure

Model Information

Data Set WORK.WINES

Dependent Variable SCORE

Covariance Structure Variance Components

Estimation Method REML

Residual Variance Method Profile

Fixed Effects SE Method Model-Based

Degrees of Freedom Method Containment

Class Level Information

Class Levels Values

JUDGE 6 J1 J2 J3 J4 J5 J6

WINE 4 W1 W2 W3 W4

Dimensions

Covariance Parameters 2

Columns in X 5

Columns in Z 6

Subjects 1

Max Obs Per Subject 24

Number of Observations

Number of Observations Read 24

Number of Observations Used 24

Number of Observations Not Used 0

Iteration History

Iteration Evaluations -2 Res Log Like Criterion

0 1 108.98547215

1 1 83.53091940 0.00000000

Convergence criteria met.

The Mixed Procedure

Covariance Parameter

Estimates

Cov Parm Estimate

JUDGE 8.3833

Residual 1.1333

Fit Statistics

-2 Res Log Likelihood 83.5

AIC (smaller is better) 87.5

AICC (smaller is better) 88.2

BIC (smaller is better) 87.1

Type 3 Tests of Fixed Effects

Num Den

Effect DF DF F Value Pr > F

WINE 3 15 53.82 <.0001

Two-Factor Experiments

with Repeated Measures on Both Factors

  1. Layout for two-factor repeated measures design with repeated measures on both factors (a=2, b=2, n=4).

Subject / Treatment order
1 2 3 4
1 / A1B2 / A2B2 / A1B1 / A2B1
2 / A2B1 / A1B2 / A2B2 / A1B1
3 / A2B2 / A1B1 / A2B1 / A1B2
4 / A1B1 / A2B1 / A1B2 / A2B2
  1. Data structure of the design

B1 / B2
A1 / Y111 Y112
Y113 Y114 / Y121 Y122
Y123 Y124
A2 / Y211 Y212
Y213 Y214 / Y221 Y222
Y223 Y224
  1. Model

Where

: Grand Total;

: Subject effect, independent with ;

: Main effect of factor A subject to ;

: Main effect of factor B subject to ;

: Interaction effect of A and B subject to for all k and

for all j.

error, independent with ;

and are independent. .

  1. ANOVA table

Source of Variation / SS / DF / MSE / E(MSE)
Subject / SSS / n-1 / SSS/n-1 /
Factor A / SSA / a-1 / SSA/a-1 /
Factor B / SSB / b-1 / SSB/b-1 /
AB interaction / SSAB / (a-1)(b-1) / SSAB/(a-1)(b-1) /
Error / SSE / (n-1)(ab-1) / SSE/(n-1)(ab-1) /
Total / SST / nab-1

Where

SSS=; SSA=; SSB=;

SSAB=; SSE=

  1. SAS program

Example: To test the efficiency of its new programmable calculator, a computer company selected at random 6 engineers who were proficient in the use of both this calculator and an earlier model and asked them to work out two problems on both calculators. One of the problems was statistical in nature, the other was an engineering problem. The order of the four calculations was randomized independently for each engineer. The length of time (in minutes) required to solve each problem was observed. The results are presented in the following table.

Engineer / Statistical problem / Engineering problem
New model / Earlier model / New model / Earlier model
Jones / 3.1 / 7.5 / 2.5 / 5.1
Williams / 3.8 / 8.1 / 2.8 / 5.3
Adams / 3.0 / 7.6 / 2.0 / 4.9
Dixon / 3.4 / 7.8 / 2.7 / 5.5
Erickson / 3.3 / 6.9 / 2.5 / 5.4
Maynes / 3.8 / 7.8 / 2.4 / 4.8

Testing the effects of A: Statistical problems and B: model

SAS Program

DATA COMPUTER;

INPUT ENGINEER $ PROBLEM $ CMODEL $ TIME;

DATALINES;

Jones StatNew 3.1 WilliamsStatNew 3.8

Adams StatNew 3 Dixon StatNew 3.4

EricksonStatNew 3.3 Maynes StatNew 3.8

Jones StatEarlier7.5 WilliamsStatEarlier8.1

Adams StatEarlier7.6 Dixon StatEarlier7.8

EricksonStatEarlier6.9 Maynes StatEarlier7.8

Jones EngiNew 2.5 WilliamsEngiNew 2.8

Adams EngiNew 2 Dixon EngiNew 2.7

EricksonEngiNew 2.5 Maynes EngiNew 2.4

Jones EngiEarlier5.1 WilliamsEngiEarlier5.3

Adams EngiEarlier4.9 Dixon EngiEarlier5.5

EricksonEngiEarlier5.4 Maynes EngiEarlier4.8

;

RUN;

PROCGLMDATA=COMPUTER;

CLASS ENGINEER PROBLEM CMODEL;

MODEL TIME=ENGINEER PROBLEM CMODEL PROBLEM*CMODEL;

RANDOM ENGINEER;

RUN;

The result is:

Dependent Variable: TIME

Sum of

Source DF Squares Mean Square F Value Pr > F

Model 8 93.00166667 11.62520833 154.09 <.0001

Error 15 1.13166667 0.07544444

Corrected Total 23 94.13333333

R-Square Coeff Var Root MSE TIME Mean

0.987978 5.885818 0.274672 4.666667

Source DF Type I SS Mean Square F Value Pr > F

ENGINEER 5 1.05833333 0.21166667 2.81 0.0554

PROBLEM 1 17.00166667 17.00166667 225.35 <.0001

CMODEL 1 71.41500000 71.41500000 946.59 <.0001

PROBLEM*CMODEL 1 3.52666667 3.52666667 46.75 <.0001

Source DF Type III SS Mean Square F Value Pr > F

ENGINEER 5 1.05833333 0.21166667 2.81 0.0554

PROBLEM 1 17.00166667 17.00166667 225.35 <.0001

CMODEL 1 71.41500000 71.41500000 946.59 <.0001

PROBLEM*CMODEL 1 3.52666667 3.52666667 46.75 <.0001

The GLM Procedure

Source Type III Expected Mean Square

ENGINEER Var(Error) + 4 Var(ENGINEER)

PROBLEM Var(Error) + Q(PROBLEM,PROBLEM*CMODEL)

CMODEL Var(Error) + Q(CMODEL,PROBLEM*CMODEL)

PROBLEM*CMODEL Var(Error) + Q(PROBLEM*CMODEL)

Two-Factor Experiments

with Repeated Measures on One Factor

  1. Layout for Two-Factor Design with Random Assignments of Factor A level to Subjects and Repeated Measures on Factor B.

Treatment Order
Incentive Stimulus / Subject / 1 / 2
A1 / 1 / A1B1 / A1B2
…… / …… / ……
n / A1B2 / A1B1
A2 / n+1 / A2B2 / A2B1
…… / …… / ……
2n / A2B1 / A2B2
  1. Description of Design

In many two-factor studies, repeated measures can only be made on one of the two factors. Consider, for instance, an experimenter who wished to study the effects of two types of incentives (factor A) on a person’s ability to solve problems. The researcher also wanted to study two types of problems (factor B) --- abstract and concrete problems. Each experimental subject could be asked to do each type of problem, but could not be exposed to more than type of incentive stimulus because of potential interference effects.

In this design, two randomizations generally need to be employed. First, the level of the nonrepeated factor needs to be randomly assigned to the subjects. Second, the order of the levels of the repeated factor need to be randomized independently for all subjects.

Since n subjects are randomly assigned incentive stimulus A1 and n subjects are randomly assigned incentive stimulus A2, as far as factor A is concerned the experiment is a completely randomized one. On the other hand, as far as factor B is concerned, each subject is a block. Thus, for factor B, the experiment is randomized block design, with block effects random.We call this experimental design a two-factor experiment with repeated measures on factor B.

In the experiment depicted in above table, comparisons between factor A level means involve differences between groups of subjects as well as differences associated with the two factor A levels. On the other hand, comparisons between factor B level means at the same level of factor A are based on the same subject, and hence only involve differences associated with the two factor B levels. Thus, for theses latter comparisons, each subject serves as its own control. The main effects of factor A are therefore said to be confounded with differences between groups of subjects, whereas the main effects of factor B are free of such confounding. It is for this reason that test on factor B main effects will generally be more sensitive than tests on the main effects for factor A.

  1. Model

Where

: Main effect of A subject to ;

: Main effect of B subject to ;

: Effect of subject nested in factor A, independent with ;

: Interaction effect of A and B subject to for all k and

for all j.

: error with ; and are independent;

i=1,……, n; j=1,……,a; k=1,……,b.

  1. ANOVA table

Source of Variation / SS / DF / MSE / E(MSE)
Factor A / SSA / a-1 / SSA/a-1 /
Factor B / SSB / b-1 / SSB/b-1 /
AB interaction / SSAB / (a-1)(b-1) / SSAB/(a-1)(b-1) /
Subjects(within A) / SSS(A) / a(n-1) / SSS(A)/(a-1)(b-1) /
Error / SSE / a(n-1)(b-1) / SSE/a(n-1)(b-1) /
Total / SST / nab-1

Where

SSS(A)=; SSA=; SSB=;

SSAB=; SSE=

SST=

  1. Example and SAS program

Example: a national retail chain wanted to study the effects of two advertising campaigns (factor A) on the volume of sales of athletic shoes over time (factor B). ten similar test markets (subjects, S) were chosen at random to participate in this study. The two advertising campaigns (A1 and A2) were similar in all respects except that a different national sports personality was used in each. Sales data were collected for three two-week periods (B1: two weeks prior to campaign; B2: two weeks during which campaign occurred; B3: two weeks after campaign was concluded). The experiment was conducted during a six-week period when sales of athletic shoes are usually quite stable. The data is present in the following table.

Advertising campaign / Test market / Time period
k=1 / k=2 / k=3
j=1 / i=1 / 958 / 1047 / 933
i=2 / 1005 / 1122 / 986
i=3 / 351 / 436 / 339
i=4 / 549 / 632 / 512
i=5 / 730 / 784 / 707
j=2 / i=1 / 780 / 897 / 718
i=2 / 229 / 275 / 202
i=3 / 883 / 964 / 817
i=4 / 624 / 695 / 599
i=5 / 375 / 436 / 351

SAS program:

DATA SHOES;

INPUT ADVER TIME MARKET SALE @@;

DATALINES;

111958 1121005 113351 114549

115730 211780 212229 213883

214624 215375 1211047 1221122

123436 124632 125784 221897

222275 223964 224695 225436

131933 132986 133339 134512

135707 231718 232202 233817

234599 235351

;

RUN;

PROCGLMDATA=SHOES;

CLASS ADVER TIME MARKET;

MODELSALE=ADVER TIME MARKET(ADVER) ADVER*TIME;

RANDOM MARKET(ADVER)/TEST;

RUN;

PROCMIXEDDATA=SHOES;

CLASS ADVER TIME MARKET;

MODELSALE=ADVER TIME ADVER*TIME;

RANDOM MARKET(ADVER);

LSMEANS ADVER TIME / DIFFADJUST=TUKEY;

RUN;

QUIT;

Split-Plot Designs

Description of design through example.

Example 1: Consider a paper manufacturer who is interested in three different pulp preparation methods and four different cooking temperatures for the pulp and who whishes to study the effect of these two factors on the tensile strength of the paper. Each replicate of a factorial requires 12 observations, and the experimenter has decided to run three replicates. However, the pilot plant is only capable of making 12 runs per day, so the experimenter decides to run one replicate on each of the three days and to consider the days or replicates as blocks. On any day, he conducts the experiment as follows. A batch of pulp is produced by one of the three methods under study. Then this batch is divided into four samples, and each sample is cooked at one of the four temperatures. Then a second batch of pulp is made up using another of the three methods. This second batch is also divided into four samples that are tested at the four temperatures. The process is then repeated, using a batch of pulp produced by the third method. The data are shown in the following table.

Replicate 1 / Replicate 2 / Replicate 3
Pulp Preparation Method / 1 / 2 / 3 / 1 / 2 / 3 / 1 / 2 / 3
Temperature
200 / 30 / 34 / 29 / 28 / 31 / 31 / 31 / 35 / 32
225 / 35 / 41 / 26 / 32 / 36 / 30 / 37 / 40 / 34
250 / 37 / 38 / 33 / 40 / 42 / 32 / 41 / 39 / 39
275 / 36 / 42 / 36 / 41 / 40 / 40 / 40 / 44 / 45

The design used in our example is a split-plot design. Each replicate or block in the split-plot design is divided into three parts called whole plots, and the preparation methods are called the whole plot or main treatments. Each whole plot is divided into four parts called subplots (or split-plots), and one temperature is assigned to each. Temperature is called the subplot treatment.

Note that if there are other uncontrolled or undersigned factors present, and if these uncontrolled factors vary as the pulp preparation methods are changed, then any effect of the undersigned factors on the response will be completely confounded with the effect of the pulp preparation methods. Because the whole plot treatments in a split-plot design are confounded with the whole plots and the subplot treatments are not confounded, it is best to assign the factor we are most interested in to the subplots, if possible.

The linear model for the above split plot design is

Where and represents the whole plot and correspond respectively to blocks or replicates, main treatments (factor A), and the whole plot error; and represents the subplot and correspond respectively to the subplot treatment (factor B), the block or replicates B and AB interactions, and the subplot error (blocks*A*B).

Example 2: Consider an investigation to study the effects of two irrigation methods (factor A) and tow fertilizers (factor B) on yield of a crop, using four available fields as experimental units. In a completely randomized design, four treatments (A1B1,A1B2,A2B1,A2B2) would then be assigned at random to the four fields. Since there are four treatments and just four experimental units, there will be no degrees of freedom for estimation of error. If the fields could be subdivided into smaller experimental units, replicates of each factor-level combination could be obtained and the error variance could then be estimated. Unfortunately, in this investigation it is not possible to apply different irrigation methods (factor A) in areas smaller than a field, although different fertilizer types (factor B) could be applied in relatively small areas. A split-plot design can accommodate this situation.

In a split-plot design, each of the two irrigation methods is randomly assigned to two of the four fields, which are usually called whole plots. In turn, each whole plot is then subdivided into two or more small areas called split plots and the two fertilizers are then randomly assigned to the split plots within each whole plot. The key feature of split-plot designs is the use of tow (or more) distinct levels of randomization. At the first level of randomization, the whole-plot treatments are randomly assigned to whole plots; at the second level, the split-plot treatments arerandomly assigned to split plots.

The layout for the example is shown below.

Note that this layout is conceptually identical to the layout for the two-factor repeated measures design. Consequently, the split-plot model here is same as the model in the previous section.

Where

: j-th whole plot treatment subject to ;

: k-th split-plot treatment subject to ;

: Effect of of the i-th whole plot nested in the j-th whole plot treatment,

independent with ;

: Interaction effect of A and B subject to for all k and

for all j.

: error with ; and are independent;

i=1,……, n; j=1,……,a; k=1,……,b.

Source of Variation / SS / DF / MSE / E(MSE)
Whole plot
Factor A / SSA / a-1 / SSA/a-1 /
Whole-plot error / SSS(A) / a(n-1) / SSS(A)/(a-1)(b-1) /
Split Plots
Factor B / SSB / b-1 / SSB/b-1 /
AB interaction / SSAB / (a-1)(b-1) / SSAB/(a-1)(b-1) /
Split-plot error / SSE / a(n-1)(b-1) / SSE/a(n-1)(b-1) /
Total / SST / nab-1

Where

SSS(A)=; SSA=; SSB=;

SSAB=; SSE=

SST=

Appendix: A comparison of PROC GLM and PROC MIXED

PROC GLM / PROC MIXED
Designed for models with all parameter fixed / Designed for models with one or more parameters Random. Can also be used for models with all Parameters random.
Based on least squares estimation / Based on (restricted) maximum likelihood estimation
Produces ANOVA table with SS and MS / Does not produce ANOVA table
All effects appear in MODEL statement / Only fixed effects appear in MODEL statement
Random effects appear in RANDOM statement / Random effects appear in RANDOM statement
Need to coerce correct tests with TEST statement or with RANDOM …/ TEST; / No need to coerce correct tests
For balanced data same inference as MIXED / For balanced data same inference as GLM
For unbalanced data with random effects ANOVA is only approximately correct / For unbalanced data provides correct inference
Many mean comparison methods through MEAN statement / No MEAN statement. Mean comparison available through the LSMEANS statement, in particular the /DIFF option in conjunction with the ADJUST=option.
CRD / proc glm data=whatever;
class treat;
model y=treat;
means treat / tukey;
run; / proc mixed data=whatever
class treat;
model y=treat;
lsmeans treat / diff adjust=tukey;
run;
CRD/SS / proc glm data=whatever;
class rep treat;
model y = treat + rep (treat);
test h=treat e=rep(treat);
means treat / tukey e=rep (treat);
run; / proc mixed data=whatever;
class rep treat;
model y = treat;
random rep(treat);
lsmeans treat / diff adjust = tukey;
run;
RCBD
w/random block / proc glm data=whatever;
class block treat;
model y = block treat;
random block / test;
means treat / tukey;
run; / proc mixed data=whatever;
class block treat;
model y = treat;
random block;
lsmeans treat / diff adjust = tukey;
run;
Split-Plot / proc glm data=whatever
class rep A B;
model y=rep A rep*A B A*B;
test h=A e=rep*A;
means A / tukey e=rep*A;
means B / tukey;
run; / proc mixed data=whatever
class rep A B;
model y=rep A B A*B;
random rep*A;
lsmeans A B/ diff adjust = tukey;
run;

References: