Analysis of variance and regression 2009-3-11 Lene Theil Skovgaard - - PowerPoint PPT Presentation

analysis of variance and regression 2009 3 11
SMART_READER_LITE
LIVE PREVIEW

Analysis of variance and regression 2009-3-11 Lene Theil Skovgaard - - PowerPoint PPT Presentation

Repeated Measurements, lts, 7-5-09 Analysis of variance and regression 2009-3-11 Lene Theil Skovgaard Repeated measurements May 7, 2009 lts Repeated Measurements, lts, 7-5-09 Repeated measurements over time Introduction. Presentation of


slide-1
SLIDE 1

Repeated Measurements, lts, 7-5-09

Analysis of variance and regression 2009-3-11

Lene Theil Skovgaard Repeated measurements May 7, 2009

lts

slide-2
SLIDE 2

Repeated Measurements, lts, 7-5-09

Repeated measurements over time

◮ Introduction. Presentation of data. 1-23 ◮ Repetition: Variance component models 24-36

(the dogs revisited)

◮ Correlation structures. 37-68 ◮ Random regression. 69-87 ◮ Baseline considerations. 88-97 ◮ Additional repetition/examples. 98-114

2 / 114

slide-3
SLIDE 3

Repeated Measurements, lts, 7-5-09

Lene Theil Skovgaard, Department of Biostatistics Institute of Public Health, University of Copenhagen e-mail: L.T.Skovgaard@biostat.ku.dk

3 / 114

slide-4
SLIDE 4

Repeated Measurements, lts, 7-5-09

Typical set-up for repeated measurements:

◮ Two or more groups of subjects

(typically receiving different treatments)

◮ Randomization at baseline ◮ Longitudinal measurements of the same quantity over time

for each subject, typically as a function of

◮ time (duration of treatment) ◮ age ◮ cumulative dose of some drug 4 / 114

slide-5
SLIDE 5

Repeated Measurements, lts, 7-5-09

Traditional presentation of data Example: Aspirin absorption for healthy and ill subjects (Matthews et.al.,1990)

5 / 114

slide-6
SLIDE 6

Repeated Measurements, lts, 7-5-09

What is the purpose of the investigation? What do we want to know?

◮ Description of time course

◮ Do we see a change over time? ◮ Linear or curved? ◮ Same pattern for all groups?

◮ Can we detect a difference between groups/treatments?

◮ Same difference for all time points? ◮ Difference in level, or trend? 6 / 114

slide-7
SLIDE 7

Repeated Measurements, lts, 7-5-09

Take care with average curves: They may hide important structures!

◮ They give no indication of the variation in the time profiles ◮ Do not average over individual profiles, unless these have

identical shapes, i.e. only shifts in level are seen between individuals.

◮ Alternative:

Make a picture of individual time profiles Calculate individual characteristics

7 / 114

slide-8
SLIDE 8

Repeated Measurements, lts, 7-5-09

Individual time profiles (spaghettiogram) - divided into groups Do we see time profiles

  • f identical shape?

Are the averages representative?

8 / 114

slide-9
SLIDE 9

Repeated Measurements, lts, 7-5-09

Commonly used characteristics

◮ The response for selected times, e.g. endpoint ◮ Average ◮ The slope, perhaps for a specific period ◮ Peak value ◮ Time to peak ◮ The area under the curve (AUC). ◮ A measure of cyclic behaviour.

These are analyzed as new observations.

9 / 114

slide-10
SLIDE 10

Repeated Measurements, lts, 7-5-09

Ex: Aspirin

◮ time to peak ◮ peak value

Conclusion: P=0.02 for identity of peak values. Quantifications!

10 / 114

slide-11
SLIDE 11

Repeated Measurements, lts, 7-5-09

Problems with the traditional presentation of data

◮ Comparison of groups for each time point separately

◮ is inefficient ◮ has a high risk of leading to chance significance ◮ Tests are not independent,

since they are carried out on the same subjects

◮ Interpretation may be difficult

◮ Changes over time

◮ cannot be evaluated ’by eye’

because we cannot see the pairing

11 / 114

slide-12
SLIDE 12

Repeated Measurements, lts, 7-5-09

Why is it difficult to analyze repeated measurements? – or at least different from usual analyses

◮ We have several measurements on each individual

◮ traditional independence assumption is violated ◮ repeated observations on the same individual are

correlated (look alike)

◮ ignoring this correlation will lead to wrong standard errors

  • r even bias,

and therefore potentially misleading conclusions

◮ Times of measurement for the subjects may vary

◮ Traditional anova-models become impossible 12 / 114

slide-13
SLIDE 13

Repeated Measurements, lts, 7-5-09

Why do we choose such a design?

◮ It is much more powerful in detecting time differences and

describing evolution over time (data are ’paired’ with the subject as its own control)

◮ We may discover that subjects have different time courses

(In designs with only cross-sectional data, this may also be the case, but we have no way of knowing!)

◮ We may identify important characteristics of the time

courses, specific for each subject (trend, peak etc.)

13 / 114

slide-14
SLIDE 14

Repeated Measurements, lts, 7-5-09

The performance of traditional approaches: (most of them requiring fixed times of observation)

◮ Description of time course

◮ two-way anova or regression in subject and time may be

used for each group separately

◮ two-way anova or regression in group and time is wrong

because it disregards the correlation within subjects

◮ three-way anova or regression in group, subject and

time is impossible, since subjects are nested in groups.

14 / 114

slide-15
SLIDE 15

Repeated Measurements, lts, 7-5-09

The performance of traditional approaches, cont’d:

◮ Comparison of groups/treatments

◮ two-way anova or regression in group and time is wrong

because it disregards the correlation within subjects

◮ three-way anova or regression in group, subject and

time is impossible, since subjects are nested in groups.

◮ Comparison for each specific time point cannot properly

detect or quantify differences in time pattern

◮ Comparison of time averages is sometimes reasonable 15 / 114

slide-16
SLIDE 16

Repeated Measurements, lts, 7-5-09

Notation from multi-level models: level unit covariate 1 single observations time effects interaction time*treatment 2 individuals treatment effects If we fail to take the correlation into account, we will experience:

◮ possible bias in the mean value structure ◮ low efficiency (type 2 error) for estimation

  • f level 1 covariates (time-related effects)

◮ too small standard errors (type 1 error) for estimates

  • f level 2 effects (treatments)

16 / 114

slide-17
SLIDE 17

Repeated Measurements, lts, 7-5-09

Healthy worker effect: Possible bias Definition of healthy worker effect: The phenomenon of workers’ usually exhibiting overall death rates lower than those

  • f the general population due to the fact that the severely ill and

disabled are ordinarily excluded from employment.

17 / 114

slide-18
SLIDE 18

Repeated Measurements, lts, 7-5-09

Hypothetical example: Decline in ’health’: Individual time courses Average curve

18 / 114

slide-19
SLIDE 19

Repeated Measurements, lts, 7-5-09

Example: Calcium supplement for adolescent women, to improve the rate of bone gain A total of 112 11-year old girls were randomized to receive either calcium or placebo. Outcome: BMD=bone mineral density, in

g cm2 ,

measured every 6 months (5 visits)

19 / 114

slide-20
SLIDE 20

Repeated Measurements, lts, 7-5-09

Level 1 covariates (unit: single observations), i.e.

◮ Time itself ◮ Covariates varying with time:

blood pressure, heart rate, age

◮ Interaction between group and time

If correlation is not taken into account, we ignore the paired situation, leading to low efficiency, i.e. too large P-values (type 2 error) Effects may go undetected!

20 / 114

slide-21
SLIDE 21

Repeated Measurements, lts, 7-5-09

Level 1 covariate: Linearity in visit, difference in slopes. Ancova: 0.0049(0.0042), P=0.25 Individual slopes: 0.0039(0.0019), P=0.050

21 / 114

slide-22
SLIDE 22

Repeated Measurements, lts, 7-5-09

Level 2 covariates (unit: individuals), i.e.

◮ Treatment ◮ Gender, age

If correlation is ignored, we act as if we have (a lot) more information than we actually have, leading to too small P-values (type 1 error) ’Noise’ may be taken to be real effects!

22 / 114

slide-23
SLIDE 23

Repeated Measurements, lts, 7-5-09

Level 2 covariate: Difference between treatment groups at endpoint Ancova: 0.023(0.003), P< 0.0001 Individual estimates: 0.027(0.014), P=0.062

23 / 114

slide-24
SLIDE 24

Repeated Measurements, lts, 7-5-09

◮ rep.

Repetition from “Variance component models”: Example: 2 groups of dogs (5 resp. 6 dogs). Average profiles

  • f osmolality,

measured 4 times (including treatments along the way) Error bars: 2SD

24 / 114

slide-25
SLIDE 25

Repeated Measurements, lts, 7-5-09

◮ rep.

Do we have ’identical’ repetitions (except for level)?

25 / 114

slide-26
SLIDE 26

Repeated Measurements, lts, 7-5-09

◮ rep.

The model must describe the characteristic differences

◮ over time ◮ between individuals ◮ ....

The rest, i.e. what the model does not describe should be of an unsystematic, random nature (noise, error).

26 / 114

slide-27
SLIDE 27

Repeated Measurements, lts, 7-5-09

◮ rep.

Model control: Residual plot for 2-way ANOVA in (dog, treatment) We see a clear trumpet shape, because dogs with a high le- vel also vary more than dogs with a low level. Multiplicative structure Solution: Make a logarithmic transformation!

27 / 114

slide-28
SLIDE 28

Repeated Measurements, lts, 7-5-09

◮ rep.

Profiles on logarithmic scale, with corresponding residual plot:

28 / 114

slide-29
SLIDE 29

Repeated Measurements, lts, 7-5-09

◮ rep.

Two-level model:

◮ Logarithmic transformation is necessary to make the

profiles look parallel

◮ but: two-way anova in dog and time cannot answer our

questions

◮ We cannot have systematic parameters for each dog, but

we may specify random variation between dog levels as well as random variation over time for each dog.

29 / 114

slide-30
SLIDE 30

Repeated Measurements, lts, 7-5-09

◮ rep.

Multilevel model structure: level 1 2 unit single measurements dogs variation within dogs between dogs σ2

W

ω2

B

covariates x z time, grp*time grp Multilevel models are part of the broader class of models: variance component models (which are not necessarily hierarchical)

30 / 114

slide-31
SLIDE 31

Repeated Measurements, lts, 7-5-09

◮ rep.

Two-level model:

◮ Observations Ygdt (group, dog, time) ◮ Systematic effect of time_no and grp ◮ Random dog-level, Var(agd) = ω2 B ◮ Residual variation, within dogs, Var(εgdt) = σ2 W

proc mixed data=dog; class grp time_no dog; model losmol=grp time_no grp*time_no / ddfm=satterth; random dog(grp); run;

31 / 114

slide-32
SLIDE 32

Repeated Measurements, lts, 7-5-09

The options ddfm=satterth (- or kenwardrogers):

◮ When the distributions are exact, they have no effect

◮ in balanced situations

◮ When approximations are necessary,

these two are considered best

◮ in unbalanced situations,

i.e for almost all observational designs

◮ in case of missing observations

◮ It may give rise to fractional degrees of freedom ◮ The computations may require a little more time,

but in most cases this will not be noticable

◮ When in doubt, use it!

32 / 114

slide-33
SLIDE 33

Repeated Measurements, lts, 7-5-09

This model assumes the so-called compound symmetry, i.e. that all measurements on the same individual are equally correlated: Corr(Ygdt1, Ygdt2) = ρ = ω2

B

ω2

B + σ2 W

This means that the distance in time is not taken into account!! Observations are exchangeable

33 / 114

slide-34
SLIDE 34

Repeated Measurements, lts, 7-5-09

Two-level model with random dog level:

Class Levels Values grp 2 1 2 time_no 4 1 2 3 4 dog 11 1 2 3 4 5 6 7 8 9 10 11 Covariance Parameter Estimates Standard Z Cov Parm Estimate Error Value Pr Z dog(grp) 0.06587 0.03532 1.86 0.0311 Residual 0.03554 0.009672 3.67 0.0001 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 9 2.85 0.1257 time_no 3 27 21.35 <.0001 grp*time_no 3 27 2.50 0.0805

P=0.08 for test of interaction, i.e. no convincing indication of this.

34 / 114

slide-35
SLIDE 35

Repeated Measurements, lts, 7-5-09

Factor diagram:

[I] = [Dog ∗ Time] Grp ∗ Time [Dog] Time Grp ❍❍❍ ❍ ❥ ✟✟✟ ✟ ✯ ✑✑✑✑ ✑ ✸ ✲ ✲

We have used the notation [ ] for the random effects, corresponding to variance components. We may note the following:

◮ The effect of Grp*Time is evaluated against Dog*Time ◮ If Grp*Time is not considered significant,

we thereafter evaluate

◮ Time against Dog*Time ◮ Grp against Dog(Grp) 35 / 114

slide-36
SLIDE 36

Repeated Measurements, lts, 7-5-09

The variance component model with random dog level specifies the covariance structure:

B B @ ω2

B + σ2 W

ω2

B

ω2

B

ω2

B

ω2

B

ω2

B + σ2 W

ω2

B

ω2

B

ω2

B

ω2

B

ω2

B + σ2 W

ω2

B

ω2

B

ω2

B

ω2

B

ω2

B + σ2 W

1 C C A = (ω2

B + σ2 W )

B B @ 1 ρ ρ ρ ρ 1 ρ ρ ρ ρ 1 ρ ρ ρ ρ 1 1 C C A

called the compound symmetry structure. The correlation ρ is here estimated to ρ = Corr(Ygdt1, Ygdt2) = ω2

B

ω2

B + σ2 W

≈ 0.06587 0.06587 + 0.03554 = 0.65

36 / 114

slide-37
SLIDE 37

Repeated Measurements, lts, 7-5-09

Note, that the specification ’random dog(grp);’ can be written in two other ways: random intercept / subject=dog(grp); repeated time / type=CS subject=dog(grp); In the following, we shall see generalizations

  • f the constructions above.

37 / 114

slide-38
SLIDE 38

Repeated Measurements, lts, 7-5-09

Compound symmetry analysis (just checking...)

proc mixed data=dog; class grp time_no dog; model losmol=grp time_no grp*time_no / ddfm=satterth; repeated time / type=cs subject=dog(grp) rcorr; run; Estimated R Correlation Matrix for dog(grp) 1 1 Row Col1 Col2 Col3 Col4 1 1.0000 0.6496 0.6496 0.6496 2 0.6496 1.0000 0.6496 0.6496 3 0.6496 0.6496 1.0000 0.6496 4 0.6496 0.6496 0.6496 1.0000 Covariance Parameter Estimates Cov Parm Subject Estimate CS dog(grp) 0.06587 Residual 0.03554 Fit Statistics

  • 2 Res Log Likelihood

14.8 AIC (smaller is better) 18.8 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 9 2.85 0.1257 time_no 3 27 21.35 <.0001 grp*time_no 3 27 2.50 0.0805 38 / 114

slide-39
SLIDE 39

Repeated Measurements, lts, 7-5-09

Since the interaction was not significant, we omit it from the model:

Covariance Parameter Estimates Standard Z Cov Parm Estimate Error Value Pr Z dog(grp) 0.06453 0.03534 1.83 0.0339 Residual 0.04088 0.01056 3.87 <.0001 Solution for Fixed Effects Standard Effect grp time_no Estimate Error DF t Value Pr > |t| Intercept 0.5422 0.1235 9 4.39 0.0017 grp 1 0.2795 0.1656 9 1.69 0.1257 grp 2 . . . . time_no 1 0.1215 0.08621 30 1.41 0.1691 time_no 2

  • 0.2173

0.08621 30

  • 2.52

0.0173 time_no 3

  • 0.4608

0.08621 30

  • 5.35

<.0001 time_no 4 . . . . Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 9 2.85 0.1257 time_no 3 30 17.66 <.0001 39 / 114

slide-40
SLIDE 40

Repeated Measurements, lts, 7-5-09

The variance component model (compound symmetry) with random dog level specifies the covariance structure:

(ω2

B + σ2 W)

    1 ρ ρ ρ ρ 1 ρ ρ ρ ρ 1 ρ ρ ρ ρ 1    

But: The assumption of equal correlation for all pairs of

  • bservations taken on the same individual is not necessarily

reasonable! Observations taken close to each other in time will often be more closely correlated than observations taken further apart!

40 / 114

slide-41
SLIDE 41

Repeated Measurements, lts, 7-5-09

In the dog example, the empirical correlation matrix is     1 0.60 0.60 0.48 0.60 1 0.73 0.63 0.60 0.73 1 0.95 0.48 0.63 0.95 1     Rather large differences are seen between individual correlations. So what?

41 / 114

slide-42
SLIDE 42

Repeated Measurements, lts, 7-5-09

Unstructured covariance If we do not assume any special structure for the covariance, we may let it be arbitrary = unstructured This is done in MIXED by using ’type=UN’ and remembering the option hlm:

proc mixed data=dog; class grp dog time_no; model losmol=grp time_no grp*time_no / ddfm=satterth; repeated time_no / type=UN hlm subject=dog(grp) rcorr; run;

42 / 114

slide-43
SLIDE 43

Repeated Measurements, lts, 7-5-09

Estimated R Correlation Matrix for dog(grp) 1 1 Row Col1 Col2 Col3 Col4 1 1.0000 0.6010 0.5978 0.4817 2 0.6010 1.0000 0.7310 0.6336 3 0.5978 0.7310 1.0000 0.9464 4 0.4817 0.6336 0.9464 1.0000 Fit Statistics

  • 2 Res Log Likelihood

2.3 AIC (smaller is better) 22.3 Type 3 Hotelling-Lawley-McKeon Statistics Num Den Effect DF DF F Value Pr > F time 3 7 90.97 <.0001 grp*time_no 3 7 4.91 0.0381

43 / 114

slide-44
SLIDE 44

Repeated Measurements, lts, 7-5-09

Advantages with unstructured covariance

◮ We do not force a wrong covariance structure upon our

  • bservations.

◮ We gain some insight in the actual structure of the

covariance. Drawbacks of the unstructured covariance

◮ We use quite a lot of parameters to describe the

covariance structure. The result may therefore be unstable.

◮ It cannot be used for small data sets ◮ It can only be used in case of balanced data

(all subjects have to be measured at identical times) Can we do something ’in between’?

44 / 114

slide-45
SLIDE 45

Repeated Measurements, lts, 7-5-09

Comparison of covariance structures, using the likelihood

◮ Good models have large values of likelihood L and

therefore small values of deviance: −2 log L

◮ Use differences in deviances (∆ = −2 log Q) and compare

to χ2 with degrees of freedom equal to the difference in parameters Comparison of compound symmetry and unstructured covariance:

−2 log Q = 14.8 − 2.3 = 12.5 ∼ χ2(10 − 2) = χ2(8) ⇒ P = 0.13.

45 / 114

slide-46
SLIDE 46

Repeated Measurements, lts, 7-5-09

◮ Default likelihood is the REML-likelihood, where the mean

value structure has been ’eliminated’

◮ The traditional likelihood may be obtained using an extra

  • ption:

proc mixed method=ml;

◮ Comparison of covariance structures:

Use either of the two likelihoods

◮ Comparison of mean value structures:

Use only the traditional likelihood (ML)

46 / 114

slide-47
SLIDE 47

Repeated Measurements, lts, 7-5-09

Autoregressive structure of first order In case of equidistant times, this specifies the following covariance structure σ2     1 ρ ρ2 ρ3 ρ 1 ρ ρ2 ρ2 ρ 1 ρ ρ3 ρ2 ρ 1     i.e. the correlation decreases (in powers) with the distance between observations. The non-equidistant analogue is Corr(Ygdt1, Ygdt2) = ρ|t1−t2|

47 / 114

slide-48
SLIDE 48

Repeated Measurements, lts, 7-5-09

The autoregressive correlation pattern:

48 / 114

slide-49
SLIDE 49

Repeated Measurements, lts, 7-5-09

Autoregressive structure of first order (TYPE=AR(1))

Estimated R Correlation Matrix for dog(grp) 1 1 Row Col1 Col2 Col3 Col4 1 1.0000 0.7950 0.6321 0.5025 2 0.7950 1.0000 0.7950 0.6321 3 0.6321 0.7950 1.0000 0.7950 4 0.5025 0.6321 0.7950 1.0000 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z AR(1) dog(dog) 0.7950 0.09035 8.80 <.0001 Residual 0.1114 0.04188 2.66 0.0039 Fit Statistics

  • 2 Res Log Likelihood

9.8 AIC (smaller is better) 13.8 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 8.89 2.49 0.1497 time_no 3 25.6 29.97 <.0001 grp*time_no 3 25.6 2.94 0.0522 49 / 114

slide-50
SLIDE 50

Repeated Measurements, lts, 7-5-09

Note: Comparison of models with different covariance structures using a χ2-test on −2 log Q (the difference between −2 log L’s) requires, that the models are nested This is not the case for CS and AR(1)! Therefore, we have to compare both of them with the model which combines the two covariance structures:

proc mixed data=dog; class grp dog time_no; model losmol = grp time_no grp*time_no / ddfm=satterth; random intercept / subject=dog(grp) vcorr; repeated time_no / type=AR(1) subject=dog(grp); run;

50 / 114

slide-51
SLIDE 51

Repeated Measurements, lts, 7-5-09

In case of equidistant times, this combined model specifies the following covariance structure     ω2 + σ2 ω2 + σ2ρ ω2 + σ2ρ2 ω2 + σ2ρ3 ω2 + σ2ρ ω2 + σ2 ω2 + σ2ρ ω2 + σ2ρ2 ω2 + σ2ρ2 ω2 + σ2ρ ω2 + σ2 ω2 + σ2ρ ω2 + σ2ρ3 ω2 + σ2ρ2 ω2 + σ2ρ ω2 + σ2    

51 / 114

slide-52
SLIDE 52

Repeated Measurements, lts, 7-5-09 Estimated V Correlation Matrix for dog(grp) 1 1 Row Col1 Col2 Col3 Col4 1 1.0000 0.7930 0.6381 0.5222 2 0.7930 1.0000 0.7930 0.6381 3 0.6381 0.7930 1.0000 0.7930 4 0.5222 0.6381 0.7930 1.0000 Covariance Parameter Estimates Cov Parm Subject Estimate dog(grp) 0.01966 AR(1) dog(grp) 0.7483 Residual 0.09103 Fit Statistics

  • 2 Res Log Likelihood

9.8 AIC (smaller is better) 15.8 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 8.88 2.49 0.1493 time_no 3 17.2 29.53 <.0001 grp*time_no 3 17.2 2.93 0.0633 52 / 114

slide-53
SLIDE 53

Repeated Measurements, lts, 7-5-09

Comparison of covariance structures:

cov. Model

  • 2 log L

par. ∆ = −2 log Q df P UN 2.3 10 7.5 7 0.38 both AR(1) and CS 9.8 3 0.0 1 1.00 AR(1) 9.8 2 5.0 1 0.025 CS=random dog 14.8 2

Conclusions?

◮ The autoregressive structure is probably the best

compromise.

◮ Our data set is too small!

53 / 114

slide-54
SLIDE 54

Repeated Measurements, lts, 7-5-09

What, if we had had double or triple measurements at each time?

◮ If we always have the same number of repetitions,

a correct and optimal approach is to analyze averages

◮ If the number of repetitions vary, analysis of averages may

still be valid (depends on the reason for the unbalance), although not optimal

◮ The easiest approach is to modify the random-statement

to: random dog dog*time_no;

54 / 114

slide-55
SLIDE 55

Repeated Measurements, lts, 7-5-09

Actually, the times are not equidistant! Measurements are taken at 50,110,170 and 290 minutes Then what?? The non-equidistant analogue to the autoregressive structure is Corr(Ygdt1, Ygdt2) = ρ|t1−t2| which is written as TYPE=SP(POW)(time) For technical reasons, we have to rescale time to hours=time/60

proc mixed covtest data=dog; class grp hours dog; model losmol=grp hours grp*hours / s ddfm=satterth; repeated hours / subject=dog(grp) type=sp(exp)(hours) rcorr; run;

55 / 114

slide-56
SLIDE 56

Repeated Measurements, lts, 7-5-09 Class Level Information Class Levels Values grp 2 1 2 hours 4 0.8333333333 1.8333333333 2.8333333333 4.8333333333 dog 11 1 2 3 4 5 6 7 8 9 10 11 Estimated R Matrix for dog(grp) 1 1 Row Col1 Col2 Col3 Col4 1 1.0000 0.8064 0.6502 0.4228 2 0.8064 1.0000 0.8064 0.5243 3 0.6502 0.8064 1.0000 0.6502 4 0.4228 0.5243 0.6502 1.0000 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 9.31 2.56 0.1433 hours 3 25.5 23.23 <.0001 grp*hours 3 25.5 2.78 0.0614 56 / 114

slide-57
SLIDE 57

Repeated Measurements, lts, 7-5-09

Example: Calcium supplement or placebo for adolescent women, to improve the rate of bone gain Outcome: BMD=bone mineral density, in

g cm2 ,

measured every 6 months (5 visits)

57 / 114

slide-58
SLIDE 58

Repeated Measurements, lts, 7-5-09

Factor diagram:

[I] = [Girl ∗ Visit] Grp ∗ Visit [Girl] Visit Grp ❍❍❍ ❍ ❥ ✟✟✟ ✟ ✯ ✑✑✑✑ ✑ ✸ ✲ ✲ Two-level model with:

◮ Observations Ygit (group=g, girl=individual=i, visit=time=t) ◮ Systematic (fixed) effects of group and visit, with a possible

interaction

◮ Random girl-level, Var(agi) = ω2

B

◮ Residual variation, within girls, Var(εgit) = σ2

W

58 / 114

slide-59
SLIDE 59

Repeated Measurements, lts, 7-5-09

Variance component model (same as for dog example): Ygit = µ + αg + βt + γgt + agi + εgit where Var(agi) = ω2

B,

Var(εgit) = σ2

W

Like previously, we have assumed compound symmetry, i.e. that all measurements on the same girl are equally correlated: Corr(Ygit1, Ygit2) = ρ = ω2

B

ω2

B + σ2 W

59 / 114

slide-60
SLIDE 60

Repeated Measurements, lts, 7-5-09

Empirical correlation structure:

Row COL1 COL2 COL3 COL4 COL5 1 1.00000000 0.96987049 0.94138162 0.92499715 0.89865454 2 0.96987049 1.00000000 0.97270895 0.95852788 0.93987185 3 0.94138162 0.97270895 1.00000000 0.98090996 0.95919348 4 0.92499715 0.95852788 0.98090996 1.00000000 0.97553849 5 0.89865454 0.93987185 0.95919348 0.97553849 1.00000000

Is compound symmetry reasonable? Other possibilities:

◮ Unstructured: T(T+1) 2

= 15 covariance parameters (T = 5)

◮ ’patterned’, e.g. an autoregressive structure ◮ random regression

60 / 114

slide-61
SLIDE 61

Repeated Measurements, lts, 7-5-09

Compound symmetry results for the calcium example:

Covariance Parameter Estimates (REML) Cov Parm Estimate GIRL(GRP) 0.00443925 Residual 0.00023471 Tests of Fixed Effects Source NDF DDF Type III F Pr > F GRP 1 110 2.63 0.1078 VISIT 4 382 619.42 0.0001 GRP*VISIT 4 382 5.30 0.0004

No doubt, we see an interaction GRP*VISIT, or?

61 / 114

slide-62
SLIDE 62

Repeated Measurements, lts, 7-5-09

Autoregressive covariance structure: σ2       1 ρ ρ2 ρ3 ρ4 ρ 1 ρ ρ2 ρ3 ρ2 ρ 1 ρ ρ2 ρ3 ρ2 ρ 1 ρ ρ4 ρ3 ρ2 ρ 1       Results:

Covariance Parameter Estimates (REML) Cov Parm Subject Estimate AR(1) GIRL(GRP) 0.97083335 Residual 0.00441242 Tests of Fixed Effects Source NDF DDF Type III F Pr > F GRP 1 110 2.74 0.1005 VISIT 4 381 233.91 0.0001 GRP*VISIT 4 381 2.86 0.0232 62 / 114

slide-63
SLIDE 63

Repeated Measurements, lts, 7-5-09

Comparison of test results for the test of no interaction GRP*VISIT: Covariance structure Test statistic ∼ distribution P value Independence 0.35 ∼ F(4,491) 0.84 Compound symmetry 5.30 ∼ F(4,382) 0.0004 Autoregressive 2.86 ∼ F(4,382) 0.023 + local 2.90 ∼ F(4,205) 0.023 Unstructured 2.72 ∼ F(4,107) 0.034

63 / 114

slide-64
SLIDE 64

Repeated Measurements, lts, 7-5-09

Predicted mean time profiles are almost identical for all choices of covariance structures

◮ For balanced designs, they agree completely

and equals simple averages

◮ They agree for time points with no missing values

(here the first visit)

64 / 114

slide-65
SLIDE 65

Repeated Measurements, lts, 7-5-09

Predicted profiles for the unstructured covariance:

◮ The evolution over time

looks pretty linear

◮ Include time=visit as

a quantitative covariate?

◮ What about the

baseline difference?

65 / 114

slide-66
SLIDE 66

Repeated Measurements, lts, 7-5-09

Test of linear time trend (time=visit, not included in the class-statement):

proc mixed data=calcium; class grp girl visit; model bmd=grp time grp*time visit grp*visit / ddfm=satterth; repeated visit / type=UN subject=girl(grp); run;

Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 110 0.36 0.5485 time . . . time*grp . . . visit 3 97.7 3.61 0.0160 / grp*visit 3 97.7 1.03 0.3849

  • ---not significant

\ 66 / 114

slide-67
SLIDE 67

Repeated Measurements, lts, 7-5-09 proc mixed data=calcium; class grp girl visit; model bmd=grp time grp*time visit / s ddfm=satterth; repeated visit / type=UN subject=girl(grp) r; run; Solution for Fixed Effects Standard Effect grp visit Estimate Error DF t Value Pr > |t| Intercept 0.8699 0.01220 138 71.29 <.0001 grp C 0.006565 0.01131 109 0.58 0.5629 grp P . . . . time 0.01755 0.001825 118 9.62 <.0001 time*grp C 0.004330 0.001520 97.2 2.85 0.0054 time*grp P . . . . visit 1

  • 0.01765

0.006013 95.8

  • 2.94

0.0042 visit 2

  • 0.01384

0.004246 95.1

  • 3.26

0.0016 visit 3

  • 0.00680

0.002370 93.6

  • 2.87

0.0050 visit 4 . . . . visit 5 . . . . 67 / 114

slide-68
SLIDE 68

Repeated Measurements, lts, 7-5-09 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 109 0.34 0.5629 time . . . time*grp 1 97.2 8.12 0.0054 visit 3 98.8 3.65 0.0151

There is some deviation from linearity (P=0.0151), which we ought to investigate further.... Tendency to slower increase with time Transformation, etc....

68 / 114

slide-69
SLIDE 69

Repeated Measurements, lts, 7-5-09

The time course is reasonably linear, but maybe the girls have different growth rates (slopes)? If we let Ygit denote BMD for the i’th girl (in the g’th group) at time t (t=1,· · · ,5), we could look at the model: ygit = agi + bgit + εgit, εgit ∼ N(0, σ2

W)

But we cannot allow all these fixed parameters in the model!

69 / 114

slide-70
SLIDE 70

Repeated Measurements, lts, 7-5-09

We might fit a straight line for each girl: Slopes in the Calcium-group seems to be bigger....

70 / 114

slide-71
SLIDE 71

Repeated Measurements, lts, 7-5-09

Results from individual regression: Group level at age 11 slope P 0.8697 (0.0086) 0.0206 (0.0014) C 0.8815 (0.0088) 0.0244 (0.0014) difference 0.0118 (0.0123) 0.0039 (0.0019) P 0.34 0.050

71 / 114

slide-72
SLIDE 72

Repeated Measurements, lts, 7-5-09

We generalize the idea of a random level to Random regression: We let each individual (girl) have

◮ her own level agi ◮ her own slope bgi

but

72 / 114

slide-73
SLIDE 73

Repeated Measurements, lts, 7-5-09

... we bind these individual ’parameters’ (agi and bgi) together by normal distributions agi bgi

  • ∼ N2

αg βg

  • , G
  • G =

τ 2

a

ω ω τ 2

b

  • =
  • τ 2

a

ρτaτb ρτaτb τ 2

b

  • G describes the population variation of the lines, i.e. the

inter-individual variation (as seen on p. 70).

73 / 114

slide-74
SLIDE 74

Repeated Measurements, lts, 7-5-09

We estimate in this model by writing:

proc mixed covtest data=calcium; class grp girl; model bmd=grp time time*grp / ddfm=satterth s; random intercept time / type=un subject=girl(grp) g v vcorr; run;

Estimated G Matrix Row Effect grp girl Col1 Col2 1 Intercept C 101 0.004105 3.733E-6 2 time C 101 3.733E-6 0.000048 Estimated V Matrix for girl(grp) 101 C Row Col1 Col2 Col3 Col4 Col5 1 0.004285 0.004211 0.004263 0.004314 0.004366 2 0.004211 0.004435 0.004410 0.004509 0.004608 3 0.004263 0.004410 0.004681 0.004703 0.004850 4 0.004314 0.004509 0.004703 0.005022 0.005092 5 0.004366 0.004608 0.004850 0.005092 0.005459 74 / 114

slide-75
SLIDE 75

Repeated Measurements, lts, 7-5-09 Estimated V Correlation Matrix for girl(grp) 101 C Row Col1 Col2 Col3 Col4 Col5 1 1.0000 0.9660 0.9518 0.9300 0.9027 2 0.9660 1.0000 0.9677 0.9553 0.9364 3 0.9518 0.9677 1.0000 0.9700 0.9594 4 0.9300 0.9553 0.9700 1.0000 0.9725 5 0.9027 0.9364 0.9594 0.9725 1.0000 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) girl(grp) 0.004105 0.000575 7.13 <.0001 UN(2,1) girl(grp) 3.733E-6 0.000053 0.07 0.9435 UN(2,2) girl(grp) 0.000048 8.996E-6 5.30 <.0001 Residual 0.000125 0.000010 11.99 <.0001 Fit Statistics

  • 2 Res Log Likelihood
  • 2341.6

AIC (smaller is better)

  • 2333.6

75 / 114

slide-76
SLIDE 76

Repeated Measurements, lts, 7-5-09 Solution for Fixed Effects Standard Effect grp Estimate Error DF t Value Pr > |t| Intercept 0.8471 0.008645 110 97.98 <.0001 grp C 0.007058 0.01234 110 0.57 0.5685 grp P . . . . time 0.02242 0.001098 95.8 20.42 <.0001 time*grp C 0.004494 0.001571 96.4 2.86 0.0052 time*grp P . . . . Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 110 0.33 0.5685 time 1 96.4 985.55 <.0001 time*grp 1 96.4 8.18 0.0052

Thus, we find an extra increase in BMD of 0.0045(0.0016) g per cm3 per half year, when giving calcium supplement.

76 / 114

slide-77
SLIDE 77

Repeated Measurements, lts, 7-5-09

Note concerning MIXED-notation

◮ It is necessary to use TYPE=UN in the RANDOM-statement

in order to allow intercept and slope to be arbitrarily correlated

◮ Default option in RANDOM is TYPE=VC, which only

specifies variance components with different variances

◮ If TYPE=UN is omitted, we may experience convergence

problems and sometimes totally incomprehensible results. In this particular case, the correlation between intercept and slope is not that impressive - actually only 0.0084 - (intercept is not completely out of range in this example, referring to visit=0).

77 / 114

slide-78
SLIDE 78

Repeated Measurements, lts, 7-5-09

It turns out, that

◮ the girls are only seen approximately twice a year

The actual dates are available and are translated into ctime, the internal date representation in SAS, denoting days since ....

We can no longer use the construction type=UN, but still the random-statement and the CS in the repeated-statement. A lot of other covariance structures will still be possible, e.g. the generalization of the autoregressive type=AR(1), as we already used for the dog-example: type=SP(POW)(ctime)

78 / 114

slide-79
SLIDE 79

Repeated Measurements, lts, 7-5-09

Furthermore,

◮ the girls were not precisely 11 years at the first visit

As a covariate, we ought to have the specific age of the girl, but unfortunately, these are not available. Note, that this will mostly affect the intercept estimates!

79 / 114

slide-80
SLIDE 80

Repeated Measurements, lts, 7-5-09

If we use the newly constructed ctime as covariate:

proc mixed covtest data=calcium; class grp girl; model bmd=grp ctime ctime*grp / ddfm=satterth s; random intercept ctime / type=un subject=girl(grp) g; run;

Iteration History Iteration Evaluations

  • 2 Res Log Like

Criterion 1

  • 1221.35800531

1 2

  • 2316.64715219

0.02023229 2 1

  • 2316.64847895

0.02011117 3 1

  • 2316.64847962

0.02010938 4 1

  • 2316.64848338

0.02010936 47 1

  • 2317.30142024

0.01737561 48 1

  • 2317.30142030

0.01737561 49 1

  • 2317.30142036

0.01737561 50 1

  • 2317.30142043

0.01737561 WARNING: Did not converge. 80 / 114

slide-81
SLIDE 81

Repeated Measurements, lts, 7-5-09

The variable ctime has much too large values, with a very small range, and we get numerical instability. We normalise, to approximate age or age11: age=(ctime-11475)/365.25+12; age11=age-11; /* intercept at age 11 */

Variable N Mean Minimum Maximum

  • ctime

501 11475.08 11078.00 11931.00 bmd 501 0.9219202 0.7460000 1.1260000 visit 560 3.0000000 1.0000000 5.0000000 age 501 12.0002186 10.9130732 13.2484600 age11 501 1.0002186

  • 0.0869268

2.2484600

  • 81 / 114
slide-82
SLIDE 82

Repeated Measurements, lts, 7-5-09

Random regression, covariate age: ygpt = agp + bgp(age-11) + εgpt

82 / 114

slide-83
SLIDE 83

Repeated Measurements, lts, 7-5-09

Random regression, using actual age (age11=age-11):

proc mixed covtest data=calcium; class grp girl; model bmd=grp age11 age11*grp / ddfm=satterth s outpm=predicted_mean; random intercept age11 / type=un subject=girl(grp) g vcorr; run;

Estimated G Matrix Row Effect grp girl Col1 Col2 1 Intercept C 101 0.004215 0.000095 2 age11 C 101 0.000095 0.000180 Estimated V Correlation Matrix for girl(grp) 101 C Row Col1 Col2 Col3 Col4 Col5 1 1.0000 0.9664 0.9537 0.9321 0.9056 2 0.9664 1.0000 0.9687 0.9566 0.9385 3 0.9537 0.9687 1.0000 0.9697 0.9590 4 0.9321 0.9566 0.9697 1.0000 0.9723 5 0.9056 0.9385 0.9590 0.9723 1.0000 83 / 114

slide-84
SLIDE 84

Repeated Measurements, lts, 7-5-09 Covariance Parameter Estimates Standard Z Cov Parm Subject Estimate Error Value Pr Z UN(1,1) girl(grp) 0.004215 0.000580 7.26 <.0001 UN(2,1) girl(grp) 0.000095 0.000104 0.91 0.3617 UN(2,2) girl(grp) 0.000180 0.000034 5.21 <.0001 Residual 0.000124 0.000010 12.01 <.0001 Solution for Fixed Effects Standard Effect grp Estimate Error DF t Value Pr > |t| Intercept 0.8667 0.008688 110 99.75 <.0001 / grp C 0.01113 0.01240 110 0.90 0.3715 ---- grp P . . . . \ age11 0.04529 0.002152 96 21.05 <.0001 / age11*grp C 0.008891 0.003076 96.6 2.89 0.0048 ---- age11*grp P . . . . \

In this model, we quantify the effect of a calcium supplement to 0.0089 (0.0031) g per cm3 per year.

84 / 114

slide-85
SLIDE 85

Repeated Measurements, lts, 7-5-09

Results from random regression: Group level at age 11 slope P 0.8667 (0.0087) 0.0453 (0.0022) C 0.8778 (0.0088) 0.0542 (0.0022) difference 0.0111 (0.0124) 0.0089 (0.0031) P 0.37 0.0048 Compare to results from individual regressions (page 71):

85 / 114

slide-86
SLIDE 86

Repeated Measurements, lts, 7-5-09

Comparison of slopes for different covariance structures:

Covariance −2 log L cov.par. AIC Difference structure in slopes P Independence

  • 1245.0

1

  • 1243.0

0.0094 (0.0086) 0.27 Compound

  • 2251.7

2

  • 2247.7

0.0089 (0.0020) < 0.0001 symmetry Exponential

  • 2372.0

2

  • 2368.0

0.0094 (0.0032) 0.0038 (autoregressive) Random

  • 2350.1

4

  • 2342.1

0.0089 (0.0031) 0.0048 regression

86 / 114

slide-87
SLIDE 87

Repeated Measurements, lts, 7-5-09

Predicted values from random regression It looks as if there is a difference right from the start (although we have previously seen this to be insignificant, P=0.37). Baseline adjustment?

87 / 114

slide-88
SLIDE 88

Repeated Measurements, lts, 7-5-09

It the first visit is a baseline measurement (which it is), and randomization has been performed:

◮ The two groups are known to be equal at baseline ◮ To include this measurement in the comparison between

groups

◮ may weaken a possible difference between these

(type 2 error)

◮ may convert a treatment effect to an interaction

◮ Dissimilarities may be present in small studies ◮ For ’slowly varying’ outcomes, even a small difference may

produce non-treatment related differences, i.e. bias

88 / 114

slide-89
SLIDE 89

Repeated Measurements, lts, 7-5-09

Simulated situation:

◮ Baseline + 2 follow-ups ◮ 2 groups, 20 individuals in each group ◮ Group 1: constant 5 ◮ Group 2: 5 at baseline, 6 at follow-ups ◮ Correlation between repeated measurements: 0.9

89 / 114

slide-90
SLIDE 90

Repeated Measurements, lts, 7-5-09

Analysis of all 3 times:

proc mixed; class grp time individual; model outcome=grp time grp*time / ddfm=satterth s; random individual(grp); run; Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 38 1.08 0.3059 time 2 76 25.95 <.0001 grp*time 2 76 16.86 <.0001 ◮ Simulation of constant group difference ◮ Finding: Significant interaction!

90 / 114

slide-91
SLIDE 91

Repeated Measurements, lts, 7-5-09

Analysis of follow-up times, with baseline as covariate:

proc mixed; where time>1; class grp time individual; model outcome=baseline grp time grp*time / ddfm=satterth s; random individual(grp); run; Solution for Fixed Effects Standard Effect grp time Estimate Error DF t Value Pr > |t| Intercept 1.5769 0.4366 37.8 3.61 0.0009 baseline 0.8743 0.08197 37 10.67 <.0001 grp 1

  • 0.7825

0.1642 49.6

  • 4.76

<.0001 grp 2 . . . . time 2

  • 0.1516

0.08975 38

  • 1.69

0.0994 time 3 . . . . grp*time 1 2 0.07651 0.1269 38 0.60 0.5502 grp*time 1 3 . . . . grp*time 2 2 . . . . grp*time 2 3 . . . . Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F baseline 1 37 113.76 <.0001 grp 1 37 24.14 <.0001 time 1 38 3.19 0.0821 grp*time 1 38 0.36 0.5502 91 / 114

slide-92
SLIDE 92

Repeated Measurements, lts, 7-5-09

Approaches for handling baseline differences:

◮ Use follow-up data only (exclude baseline from analysis)

  • most reasonable if correlation between repeated

measurements is very low

◮ Subtract baseline from successive measurements

  • most reasonable if correlation between repeated

measurements is very high

◮ Use baseline measurement as a covariate

  • may be used for any degree of correlation

92 / 114

slide-93
SLIDE 93

Repeated Measurements, lts, 7-5-09

Baseline included as a covariate

◮ will hardly change the results for the slopes

– since these are within-individual quantities A small change is expected because of the exclusion of visit 1 from the analysis, and because slope is correlated with....

◮ may affect the difference between groups at fixed ages

– e.g. endpoint age of 13 years

93 / 114

slide-94
SLIDE 94

Repeated Measurements, lts, 7-5-09

Using age13 as covariate:

proc mixed covtest noclprint data=calcium; class grp girl; model bmd=grp age13 grp*age13 / ddfm=satterth s; random intercept age13 / type=un subject=girl(grp) g; run;

Solution for Fixed Effects Standard Effect grp Estimate Error DF t Value Pr > |t| Intercept 0.9573 0.009819 108 97.49 <.0001 grp C 0.02891 0.01402 108 2.06 0.0416 grp P . . . . age13 0.04529 0.002152 96 21.05 <.0001 age13*grp C 0.008891 0.003076 96.6 2.89 0.0048 age13*grp P . . . .

Estimated gain at the age 13: 0.0289 (0.0140) g per cm3

94 / 114

slide-95
SLIDE 95

Repeated Measurements, lts, 7-5-09

Excluding baseline (4 visits only), without baseline as covariate:

proc mixed covtest noclprint data=calcium; where visit>1; class grp girl; model bmd=grp age13 grp*age13 / ddfm=satterth s; random intercept age13 / type=un subject=girl(grp) g; run;

Solution for Fixed Effects Standard Effect grp Estimate Error DF t Value Pr > |t| Intercept 0.9574 0.009721 102 98.49 <.0001 grp C 0.02474 0.01383 102 1.79 0.0765 grp P . . . . age13 0.04634 0.002288 92.3 20.25 <.0001 age13*grp C 0.007456 0.003277 92.5 2.28 0.0252 age13*grp P . . . .

Estimated gain at the age 13: 0.0247 (0.0138) g per cm3

95 / 114

slide-96
SLIDE 96

Repeated Measurements, lts, 7-5-09

Including baseline as covariate

proc mixed covtest noclprint data=calcium; where visit>1; class grp girl; model bmd=baseline grp age13 grp*age13 / ddfm=satterth s; random intercept age13 / type=un subject=girl(grp) g; run;

Solution for Fixed Effects Standard Effect grp Estimate Error DF t Value Pr > |t| Intercept 0.01825 0.02690 106 0.68 0.4989 baseline 1.0797 0.03054 102 35.36 <.0001 grp C 0.01728 0.006236 101 2.77 0.0067 grp P . . . . age13 0.04597 0.002287 93.1 20.11 <.0001 age13*grp C 0.007419 0.003276 93.2 2.26 0.0258 age13*grp P . . . .

Estimated gain at the age 13: 0.0173 (0.0062) g per cm3

96 / 114

slide-97
SLIDE 97

Repeated Measurements, lts, 7-5-09

Including baseline as covariate

◮ explains some (but not all) of the difference between

groups at age 13 without baseline: 0.0247 (0.0138) baseline as covariate: 0.0173 (0.0062)

◮ increases the precision of the estimated difference

(standard error becomes smaller) It even becomes significant!

97 / 114

slide-98
SLIDE 98

Repeated Measurements, lts, 7-5-09

Specification of mixed models:

◮ Systematic variation:

◮ Between-individual covariates:

treatment, sex, age, baseline value...

◮ Within-individual covariates:

time, cumulative dose, temperature...

is specified “as usual”

◮ Random variation ◮ Interactions between systematic and random effects

are always random

98 / 114

slide-99
SLIDE 99

Repeated Measurements, lts, 7-5-09

Sources of random variation:

  • 1. Random effects:
  • 2. Serial correlation:
  • 3. Measurement error:

99 / 114

slide-100
SLIDE 100

Repeated Measurements, lts, 7-5-09

SAS, PROC MIXED

◮ model

describes the systematic part (fixed effects, mean value structure)

◮ random

describes the random effects

◮ repeated

describes the serial correlation

◮ local

adds an additional measurement error

100 / 114

slide-101
SLIDE 101

Repeated Measurements, lts, 7-5-09

◮ rep.

Longitudinal (within-individual, βW) effect vs. cross-sectional (between-individual, βB) effect: Example: Reading ability, as a function of age and cohort:

101 / 114

slide-102
SLIDE 102

Repeated Measurements, lts, 7-5-09

Baseline measurement: yp1 at the age xp1, true level ap After some training: yp2 at the age xp2, learning effect: βW Model: yp1 = ap + εp1 ap = α + βBxp1 + δp yp2 = ap + βW(xp2 − xp1) + εp2 yp2 − yp1 = βW(xp2 − xp1) + εp2 − εp1 − δp ypj = α + βBxp1 + βW(xpj − xp1) + δp + εpj

102 / 114

slide-103
SLIDE 103

Repeated Measurements, lts, 7-5-09

Regression with inter- as well as intra-individual effect of age/time:

proc mixed data=reading; class id; model read=age1 difage / s; random id; run; Covariance Parameter Estimates Cov Parm Estimate id 245.35 Residual 27.0449 Standard Effect Estimate Error DF t Value Pr > |t| Intercept 78.1267 19.1124 4 4.09 0.0150 age1

  • 1.3615

0.5722 5

  • 2.38

0.0632 difage 0.8646 0.3121 5 2.77 0.0394

103 / 114

slide-104
SLIDE 104

Repeated Measurements, lts, 7-5-09

Estimations results:

method cross sectional (βB) longitudinal (βW ) cohort effect age effect yi1 vs. xi1

  • 1.359 (0.458)

– yi2 vs. xi2

  • 1.245 (0.534)

– yij vs. xij

  • 1.000 (0.384)

– no individual effect yi2 − yi1 vs. xi2 − xi1 – 0.883 (0.211) no intercept yij vs. xij – 0.676 (0.307) random individual effect yij vs.

  • 1.362 (0.572)

0.865 (0.312) xi1 and (xi2 − xi1)

104 / 114

slide-105
SLIDE 105

Repeated Measurements, lts, 7-5-09

Example with only two time points (baseline and follow-up) from Vickers, A.J. & Altman, D.G.: Analysing controlled clinical trials with baseline and follow-up measurements. British Medical Journal 2001; 323: 1123-24.: 52 patients with shoulder pain are randomized to either

◮ Acupuncture (n=25) ◮ Placebo (n=27)

Pain is evaluated on a 100 point scale before and after treatment. High scores are good

105 / 114

slide-106
SLIDE 106

Repeated Measurements, lts, 7-5-09

Results: Pain score (mean and SD)

placebo acupuncture difference (n=27) (n=25) (95% CI) P-value baseline 53.9 (14.0) 60.4 (12.3) 6.5 0.09

Type of analysis

follow-up 62.3 (17.9) 79.6 (17.1) 17.3 (7.5; 27.1) 0.0008 changes* 8.4 (14.6) 19.2 (16.1) 10.8 (2.3; 19.4) 0.014 ancova 12.7 (4.1; 21.3) 0.005 * results published in Kleinhenz et.al. Pain 1999; 83:235-41.

106 / 114

slide-107
SLIDE 107

Repeated Measurements, lts, 7-5-09

Development of pain, actual and hypothetical.

107 / 114

slide-108
SLIDE 108

Repeated Measurements, lts, 7-5-09

Baseline

◮ The acupuncture group lies somewhat above placebo

Follow-up

◮ We would expect the acupuncture group to be higher also

after treatment

◮ Therefore, a direct comparison of follow-up times is

unreasonable (we see too big a difference)

108 / 114

slide-109
SLIDE 109

Repeated Measurements, lts, 7-5-09

Change

◮ Low baseline implies an expected large positive change

(regression to the mean)

◮ The placebo group is therefore expected to increase the

most

◮ Therefore, a direct comparison of changes is unreasonable

(we see too small a difference)

109 / 114

slide-110
SLIDE 110

Repeated Measurements, lts, 7-5-09

What should we do in such a situation?

◮ Ancova

Analysis of covariance, a special case of multiple regression:

◮ Outcome: follow-up data ◮ Covariates ◮ treatment (factor: acupuncture/placebo) ◮ baseline measurement (quantitative) ◮ Possibly an interaction

◮ Repeated measurement analysis

110 / 114

slide-111
SLIDE 111

Repeated Measurements, lts, 7-5-09

◮ rep.

Explained variation in percent, R2 We have two (or more) different variances to explain!

◮ residual variation (variation within individuals, σ2 W)

◮ decreases (as usual)

when we include an important x covariate (level 1)

◮ may decrease

when we include an important z covariate (level 2)

◮ variation between individuals , ω2 B

◮ decreases

when we include an important z covariate (level 2)

◮ may increase or decrease,

when we include an important x covariate (level 1)

111 / 114

slide-112
SLIDE 112

Repeated Measurements, lts, 7-5-09

◮ rep.

Hypothetical example: The x’s vary between individuals, but the average outcomes (¯ y) are almost identical: Levels of y, for fixed x are very different! ω2 increases

112 / 114

slide-113
SLIDE 113

Repeated Measurements, lts, 7-5-09

◮ rep.

Another hypothetical example: The x’s vary between individuals, and the average outcomes (¯ y) are mostly due to this variation: Levels of y, for fixed x are quite alike! ω2 decreases

113 / 114

slide-114
SLIDE 114

Repeated Measurements, lts, 7-5-09

References:

◮ Ex: Aspirin absorption for healthy and ill subjects

(Matthews et.al.,1990)

◮ Vickers, A.J. & Altman, D.G.: Analysing controlled clinical

trials with baseline and follow-up measurements. British Medical Journal 2001; 323: 1123-24.:

◮ Kleinhenz et.al. Pain 1999; 83:235-41.

114 / 114