Correlated data. Repeated measurements over time. Typical set-up for repeated measurements. Traditional presentation of data

Similar documents
Analysis of variance and regression. May 13, 2008

Correlated data. Longitudinal data. Typical set-up for repeated measurements. Examples from literature, I. Faculty of Health Sciences

Faculty of Health Sciences. Correlated data. Variance component models. Lene Theil Skovgaard & Julie Lyng Forman.

Correlated data. Overview. Variance component models. Terminology for correlated measurements. Faculty of Health Sciences. Variance component models

Models for longitudinal data

Faculty of Health Sciences. Correlated data. Variance component models. Lene Theil Skovgaard & Julie Lyng Forman.

Correlated data. Overview. Example: Swelling due to vaccine. Variance component models. Faculty of Health Sciences. Variance component models

Variance components and LMMs

Variance components and LMMs

Linear mixed models. Faculty of Health Sciences. Analysis of repeated measurements, 10th March Julie Lyng Forman & Lene Theil Skovgaard

Variance component models part I

Answer to exercise: Blood pressure lowering drugs

over Time line for the means). Specifically, & covariances) just a fixed variance instead. PROC MIXED: to 1000 is default) list models with TYPE=VC */

Analysis of variance and regression. December 4, 2007

Linear mixed models. Program. What are repeated measurements? Outline. Faculty of Health Sciences. Analysis of repeated measurements, 10th March 2015

SAS Syntax and Output for Data Manipulation:

Introduction to SAS proc mixed

Statistics for exp. medical researchers Regression and Correlation

Introduction to SAS proc mixed

Varians- og regressionsanalyse

Multi-factor analysis of variance

MIXED MODELS FOR REPEATED (LONGITUDINAL) DATA PART 2 DAVID C. HOWELL 4/1/2010

Correlated data. Variance component models. Example: Evaluate vaccine. Traditional assumption so far. Faculty of Health Sciences

Faculty of Health Sciences. Correlated data. More about LMMs. Lene Theil Skovgaard. December 4, / 104

Introduction to Within-Person Analysis and RM ANOVA

Models for binary data

Random Coefficient Model (a.k.a. multilevel model) (Adapted from UCLA Statistical Computing Seminars)

Introduction to Random Effects of Time and Model Estimation

Describing Within-Person Fluctuation over Time using Alternative Covariance Structures

Variance component models

Correlated data. Overview. Variance component models. Terminology for correlated measurements. Faculty of Health Sciences. Variance component models

SAS Syntax and Output for Data Manipulation: CLDP 944 Example 3a page 1

Describing Change over Time: Adding Linear Trends

More about linear mixed models

Analysis of Longitudinal Data: Comparison Between PROC GLM and PROC MIXED. Maribeth Johnson Medical College of Georgia Augusta, GA

STAT 5200 Handout #23. Repeated Measures Example (Ch. 16)

Review of CLDP 944: Multilevel Models for Longitudinal Data

An Introduction to Multilevel Models. PSYC 943 (930): Fundamentals of Multivariate Modeling Lecture 25: December 7, 2012

SAS Code for Data Manipulation: SPSS Code for Data Manipulation: STATA Code for Data Manipulation: Psyc 945 Example 1 page 1

Analysis of Longitudinal Data: Comparison between PROC GLM and PROC MIXED.

Supplemental Materials. In the main text, we recommend graphing physiological values for individual dyad

Faculty of Health Sciences. Correlated data. Count variables. Lene Theil Skovgaard & Julie Lyng Forman. December 6, 2016

Analysis of variance and regression. November 22, 2007

Repeated Measures Modeling With PROC MIXED E. Barry Moser, Louisiana State University, Baton Rouge, LA

ANOVA Longitudinal Models for the Practice Effects Data: via GLM

Describing Within-Person Change over Time

Serial Correlation. Edps/Psych/Stat 587. Carolyn J. Anderson. Fall Department of Educational Psychology

Repeated Measures Data

Chapter 3 ANALYSIS OF RESPONSE PROFILES

Review of Unconditional Multilevel Models for Longitudinal Data

A Re-Introduction to General Linear Models (GLM)

Covariance Structure Approach to Within-Cases

Lab 11. Multilevel Models. Description of Data

Independence (Null) Baseline Model: Item means and variances, but NO covariances

Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study

Repeated Measures Design. Advertising Sales Example

Review of Multilevel Models for Longitudinal Data

Model Assumptions; Predicting Heterogeneity of Variance

Chapter 9. Multivariate and Within-cases Analysis. 9.1 Multivariate Analysis of Variance

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator

Random Intercept Models

BIOSTATISTICAL METHODS

Correlated data. Non-normal outcomes. Reminder on binary data. Non-normal data. Faculty of Health Sciences. Non-normal outcomes

Correlated data. Overview. Cross-over study. Repetition. Faculty of Health Sciences. Variance component models, II. More on variance component models

Testing Indirect Effects for Lower Level Mediation Models in SAS PROC MIXED

Time-Invariant Predictors in Longitudinal Models

Longitudinal Data Analysis Using SAS Paul D. Allison, Ph.D. Upcoming Seminar: October 13-14, 2017, Boston, Massachusetts

A (Brief) Introduction to Crossed Random Effects Models for Repeated Measures Data

Longitudinal Data Analysis of Health Outcomes

General Linear Model (Chapter 4)

36-402/608 Homework #10 Solutions 4/1

Advantages of Mixed-effects Regression Models (MRM; aka multilevel, hierarchical linear, linear mixed models) 1. MRM explicitly models individual

Parametrisations, splines

Estimation: Problems & Solutions

Statistical Inference: The Marginal Model

Statistical Distribution Assumptions of General Linear Models

Biostatistics Workshop Longitudinal Data Analysis. Session 4 GARRETT FITZMAURICE

Time-Invariant Predictors in Longitudinal Models

Topic 17 - Single Factor Analysis of Variance. Outline. One-way ANOVA. The Data / Notation. One way ANOVA Cell means model Factor effects model

Measurement Invariance (MI) in CFA and Differential Item Functioning (DIF) in IRT/IFA

Introduction to Crossover Trials

Analyzing the Behavior of Rats by Repeated Measurements

Estimation: Problems & Solutions

A Re-Introduction to General Linear Models

df=degrees of freedom = n - 1

Multilevel Methodology

Correlation and Simple Linear Regression

VIII. ANCOVA. A. Introduction

Time Invariant Predictors in Longitudinal Models

CHL 5225 H Crossover Trials. CHL 5225 H Crossover Trials

Designing Multilevel Models Using SPSS 11.5 Mixed Model. John Painter, Ph.D.

STK4900/ Lecture 10. Program

Time-Invariant Predictors in Longitudinal Models

Longitudinal data: simple univariate methods of analysis

Repeated Measures ANOVA Multivariate ANOVA and Their Relationship to Linear Mixed Models

Statistics for exp. medical researchers Comparison of groups, T-tests and ANOVA

Time-Invariant Predictors in Longitudinal Models

RANDOM and REPEATED statements - How to Use Them to Model the Covariance Structure in Proc Mixed. Charlie Liu, Dachuang Cao, Peiqi Chen, Tony Zagar

Introduction to General and Generalized Linear Models

UNIVERSITY OF TORONTO Faculty of Arts and Science

Transcription:

Faculty of Health Sciences Repeated measurements over time Correlated data NFA, May 22, 2014 Longitudinal measurements Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics University of Copenhagen Presentation of data. Simple approaches. Correlation structures. Random regression. Baseline considerations. Home page: http://staff.pubhealth.ku.dk/~jufo/repeatedmeasuresnfa2014.html E-mail: jufo@sund.ku.dk, ltsk@sund.ku.dk 1 / 84 2 / 84 Typical set-up for repeated measurements Traditional presentation of data 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 Level 1: Single observations Level 2: Patients/Subjects Example: Aspirin absorption for healthy and ill subjects (Matthews et.al.,1990) 3 / 84 4 / 84

Problems with the traditional presentation of data Take care with average curves 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 They may hide important structures They give no indication of the variation in the time profiles Always make a picture of individual time profiles Do not average over individual profiles, unless these have identical shapes, i.e. only shifts in level are seen between individuals. Alternative: Calculate individual characteristics 5 / 84 6 / 84 Individual time profiles Commonly used characteristics Spaghettiplot - divided into groups Do we see time profiles of identical shape? Are the averages representative? 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. 7 / 84 8 / 84

Example: Aspirin absorption Repeated measurement designs Characteristics: time to peak peak value Conclusion: P=0.02 for identity of peak values. Remember quantifications! Merits It is much more powerful in detecting time changes (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.) 9 / 84 10 / 84 Repeated measurement designs Example: Calcium supplements Drawbacks Traditional independence assumption is violated since repeated observations on the same individual are correlated (look alike) Traditional anova-models become impossible Comparison of time averages (or other characteristics) cannot incorporate time dependent covariates A total of 112 11-year old girls were randomized to receive either calcium or placebo. Outcome: BMD=bone mineral density, in measured every 6 months (5 visits) g cm 2, Scientific question: Does calcium improve the rate of bone gain for adolescent women? 11 / 84 12 / 84

Individual profiles Factor diagram [Girl] Grp [I ] = [Girl Visit] Grp Visit Visit Two-level model with: Observations Y git (group=g, girl=individual=i, visit=time=t) Systematic (fixed) effects of group and visit, with a possible interaction Random girl-level, Var(a gi ) = ωb 2, i.e., random intercept Residual variation, within girls, Var(ε git ) = σ 2 W 13 / 84 14 / 84 Multilevel model structure Random girl level in SAS Y git = µ gt + A gi + ε git Level 1 2 Unit single measurements girls Variation within girls between girls σw 2 ωb 2 Covariates x z visit, grp*visit grp proc mixed data=calcium; class grp girl visit; model bmd=grp visit grp*visit / ddfm=satterth s; random girl(grp); Girls are nested in groups, specified by the notation random girl(grp); satterth could be replaced by kenwardroger 15 / 84 16 / 84

The options Random girl level, output 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! 17 / 84 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 18 / 84 Random girl level, output, continued Model checks Solution for Fixed Effects Standard Effect grp visit Estimate Error DF t Value Pr > t Intercept 0.9576 0.009131 122 104.87 <.0001 grp C 0.02951 0.01304 122 2.26 0.0254 grp P 0.... visit 1-0.08750 0.003100 382-28.22 <.0001 visit 2-0.06748 0.003103 381-21.75 <.0001 visit 3-0.04342 0.003117 381-13.93 <.0001 visit 4-0.01619 0.003148 381-5.14 <.0001 visit 5 0.... grp*visit C 1-0.01912 0.004445 382-4.30 <.0001 grp*visit C 2-0.01255 0.004448 381-2.82 0.0050 grp*visit C 3-0.00622 0.004480 381-1.39 0.1661 grp*visit C 4-0.00679 0.004517 381-1.50 0.1337 grp*visit C 5 0.... grp*visit P 1 0.... grp*visit P 2 0.... grp*visit P 3 0.... grp*visit P 4 0.... grp*visit P 5 0.... Two types of residuals: Ordinary Observed minus predicted group mean (only systematic effects) Y git ˆµ gt Conditional Observed minus predicted individual mean value (systematic and random effects) ˆε git = Y git ˆµ gt ˆ A gi Difference between groups at visit 5 Difference increases over time 19 / 84 20 / 84

Model check, ordinary residuals Model check, conditional residuals 21 / 84 22 / 84 Correlated observations Level 1 covariates (unit: single observations) If we fail to take the correlation into account, we will experience: possible bias in the mean value structure in unbalanced situations low efficiency (type 2 error) for estimation of level 1 covariates (time-related effects) too small standard errors (type 1 error) for estimates of level 2 effects (treatments) 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! 23 / 84 24 / 84

Incorrect analysis Level 2 covariates (unit: individuals) Correlation ignored proc glm data=calcium; class grp visit; model bmd=grp visit grp*visit / solution; Source DF Type III SS Mean Square F Value Pr > F grp 1 0.05063714 0.05063714 11.05 0.0010 visit 4 0.64369784 0.16092446 35.10 <.0001 grp*visit 4 0.00649557 0.00162389 0.35 0.8411 The interaction is not detected since we forgot the pairing Treatment Gender, age If correlation is ignored, we act as if we have more information than we actually have, leading to too small P-values Type 1 error Noise may be taken to be real effects! 25 / 84 26 / 84 Model synonyms Compound symmetry = Exchangeability Two-level model Model with random subject levels Model with random intercepts Model with compound symmetry correlation structure Model with exchangeability correlation structure The two-level model assumes compound symmetry, i.e., that all measurements on the same individual are equally correlated: Corr(Y git1, Y git2 ) = ρ = ω 2 B ω 2 B + σ2 W This means that the distance in time is not taken into account!! Observations are exchangeable 27 / 84 28 / 84

Compound symmetry structure Estimation of correlation ρ ωb 2 + σ2 W ωb 2 ωb 2 ωb 2 ωb 2 ωb 2 ωb 2 + σ2 W ωb 2 ωb 2 ωb 2 ωb 2 ωb 2 ωb 2 + σ2 W ωb 2 ωb 2 ωb 2 ωb 2 ωb 2 ωb 2 + σ2 W ωb 2 ωb 2 ωb 2 ωb 2 ωb 2 ωb 2 + σ2 W = (ω 2 B + σ2 W ) 1 ρ ρ ρ ρ ρ 1 ρ ρ ρ ρ ρ 1 ρ ρ ρ ρ ρ 1 ρ ρ ρ ρ ρ 1 But: Observations taken close to each other in time will often be more closely correlated than observations taken further apart! The correlation ρ is estimated by using output from p. 18 ρ = Corr(Y gdt1, Y gdt2 ) = ω 2 B ω 2 B + σ2 W 0.00443925 0.00443925 + 0.00023471 = 0.9498 High tracking, meaning that each girl stays more or less at the same rank in the group 29 / 84 30 / 84 Alternative specifications Compound symmetry analysis (just checking...) Note, that the specification random girl(grp); can be written in two other ways: random intercept / subject=girl(grp); repeated visit / type=cs subject=girl(grp); CS: Compound symmetry In the following, we shall see generalizations of the constructions above. proc mixed data=calcium; class grp girl visit; model bmd=grp visit grp*visit / ddfm=satterth outpredm=fit_cs; repeated visit / type=cs subject=girl(grp) rcorr; Estimated R Correlation Matrix for girl(grp) 101 C Row Col1 Col2 Col3 Col4 Col5 1 1.0000 0.9498 0.9498 0.9498 0.9498 2 0.9498 1.0000 0.9498 0.9498 0.9498 3 0.9498 0.9498 1.0000 0.9498 0.9498 4 0.9498 0.9498 0.9498 1.0000 0.9498 5 0.9498 0.9498 0.9498 0.9498 1.0000 31 / 84 32 / 84

Compound symmetry analysis, continued Empirical correlation structure Covariance Parameter Estimates Cov Parm Subject Estimate CS girl(grp) 0.004439 Residual 0.000235 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 Fit Statistics -2 Res Log Likelihood -2188.8 <-----------used later (p. 38+47) Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 110 2.63 0.1078 visit 4 382 619.42 <.0001 grp*visit 4 382 5.30 0.0004 Is compound symmetry reasonable? Other possibilities: Hardly... Unstructured: T(T+1) 2 = 15 covariance parameters (T = 5) Patterned, e.g. an autoregressive structure Random regression 33 / 84 34 / 84 Unstructured covariance Output from TYPE=UN model If we do not assume any specific structure for the covariance, we may let it be arbitrary = unstructured This is done in MIXED by using type=un proc mixed data=calcium; class grp girl visit; model bmd=grp visit grp*visit / ddfm=satterth outpredm=fit_un; repeated visit / type=un subject=girl(grp) rcorr; Estimated R Correlation Matrix for girl(grp) 101 C Row Col1 Col2 Col3 Col4 Col5 1 1.0000 0.9699 0.9414 0.9250 0.8987 2 0.9699 1.0000 0.9727 0.9585 0.9399 3 0.9414 0.9727 1.0000 0.9809 0.9592 4 0.9250 0.9585 0.9809 1.0000 0.9755 5 0.8987 0.9399 0.9592 0.9755 1.0000 Fit Statistics -2 Res Log Likelihood -2346.3 <-----------used later (p. 38+47) Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 109 2.55 0.1129 visit 4 97.1 258.08 <.0001 grp*visit 4 97.1 2.79 0.0303 35 / 84 36 / 84

Unstructured covariance Advantages with unstructured covariance We do not force a wrong covariance structure upon our observations. 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? 37 / 84 Comparison of covariance structures Use 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 CS and UN: 2 log Q = 2346.3 2188.8 = 157.5 χ 2 (15 2) = χ 2 (13) P < 0.0001 Compound symmetry is not suitable 38 / 84 Different forms of the likelihood Autoregressive structure - of first order Default likelihood is the REML-likelihood, where the mean value structure has been eliminated The traditional likelihood may be obtained using an extra option: 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) only! But mostly, just use the default F-tests In case of equidistant times, this specifies the following covariance structure σ 2 1 ρ ρ 2 ρ 3 ρ 4 ρ 1 ρ ρ 2 ρ 3 ρ 2 ρ 1 ρ ρ 2 ρ 3 ρ 2 ρ 1 ρ ρ 4 ρ 3 ρ 2 ρ 1 i.e. the correlation decreases (in powers) with the distance between observations. The non-equidistant analogue is Corr(Y git1, Y git2 ) = ρ t 1 t 2 39 / 84 40 / 84

Autoregressive correlation Autoregressiove covariance structure in SAS as a function of distance between the measurements for ρ = 0.1,..., 0.9 proc mixed data=calcium; class grp girl visit; model bmd=grp visit grp*visit / ddfm=satterth outpredm=fit_ar1; repeated visit / type=ar(1) subject=girl(grp) rcorr; 41 / 84 42 / 84 Output from TYPE=AR(1) structure Estimated R Correlation Matrix for girl(grp) 101 C Row Col1 Col2 Col3 Col4 Col5 1 1.0000 0.9708 0.9425 0.9150 0.8883 2 0.9708 1.0000 0.9708 0.9425 0.9150 3 0.9425 0.9708 1.0000 0.9708 0.9425 4 0.9150 0.9425 0.9708 1.0000 0.9708 5 0.8883 0.9150 0.9425 0.9708 1.0000 Covariance Parameter Estimates Cov Parm Subject Estimate AR(1) girl(grp) 0.9708 Residual 0.004412 Fit Statistics -2 Res Log Likelihood -2318.6 <-----------used later (p. 47) Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 113 2.74 0.1005 visit 4 382 233.91 <.0001 grp*visit 4 382 2.86 0.0232 Note: Comparison of models with different covariance structures 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=calcium; class grp girl visit; model bmd=grp visit grp*visit / ddfm=satterth outpredm=fit_ar1; random intercept / subject=girl(grp) g; repeated visit / type=ar(1) subject=girl(grp) rcorr; 43 / 84 44 / 84

Combination of CS and AR(1) 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 ρ 4 ω 2 + σ 2 ρ ω 2 + σ 2 ω 2 + σ 2 ρ ω 2 + σ 2 ρ 2 ω 2 + σ 2 ρ 3 ω 2 + σ 2 ρ 2 ω 2 + σ 2 ρ ω 2 + σ 2 ω 2 + σ 2 ρ ω 2 + σ 2 ρ 2 ω 2 + σ 2 ρ 3 ω 2 + σ 2 ρ 2 ω 2 + σ 2 ρ ω 2 + σ 2 ω 2 + σ 2 ρ ω 2 + σ 2 ρ 4 ω 2 + σ 2 ρ 3 ω 2 + σ 2 ρ 2 ω 2 + σ 2 ρ ω 2 + σ 2 Dividing all entries with ω 2 + σ 2 gives the correlation matrix, with correlations ω 2 + σ 2 ρ d 45 / 84 ω 2 + σ 2 Output from CS+AR(1) Estimated R Correlation Matrix for girl(grp) 101 C Row Col1 Col2 Col3 Col4 Col5 1 1.0000 0.9708 0.9425 0.9150 0.8883 2 0.9708 1.0000 0.9708 0.9425 0.9150 3 0.9425 0.9708 1.0000 0.9708 0.9425 4 0.9150 0.9425 0.9708 1.0000 0.9708 5 0.8883 0.9150 0.9425 0.9708 1.0000 Covariance Parameter Estimates Cov Parm Subject Estimate Intercept girl(grp) 0 AR(1) girl(grp) 0.9708 Residual 0.004413 Fit Statistics -2 Res Log Likelihood -2318.6 <-----------used later (p. 47) Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F grp 1 113 2.74 0.1005 visit 4 382 233.91 <.0001 grp*visit 4 382 2.86 0.0232 46 / 84 Comparison of covariance structures Test of no interaction GRP*VISIT cov. = Model -2 log L par. 2 log Q df P UN 2346.3 15 AR(1) + CS 2318.6 3 27.7 12 0.006 AR(1) 2318.6 2 0 1 1 CS 2188.8 2 129.8 1 < 0.0001 Conclusions? The autoregressive structure is definitely better than CS, but not good quite enough... for various choices of covariance structure 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 Unstructured 2.72 F(4,107) 0.034 Not quite identical conclusions! 47 / 84 48 / 84

Adding an extra level Predicted mean time profiles What, if we had had double or triple measurements at each visit? 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 girl girl*visit; In SAS: Use the outpredm=newdata-option and make pictures using this new data set Profiles are almost identical for all choices of covariance structures For balanced designs, they agree completely and equal simple averages They agree for time points with no missing values (here the first visit) 49 / 84 50 / 84 Predicted profiles for the unstructured covariance Individual growth rates? The time course is reasonably linear, but maybe the girls have different growth rates (slopes)? If we let Y git denote BMD for the i th girl (in the g th group) at time t (t=1,,5), we could look at the model: The evolution over time looks pretty linear Include time=visit as a quantitative covariate? What about the baseline difference? later... y git = A gi + B gi t + ε git, ε git N (0, σ 2 ) i.e., with different intercepts and different slopes for each girl 51 / 84 52 / 84

Fit a straight line for each girl Results from individual regression Scatterplot of slopes vs. levels at first visit: Estimates with standard errors in brackets: 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-value 0.34 0.050 Slopes in the Calcium-group (blue dots) seem to be bigger... 53 / 84 54 / 84 Random regression a generalization of the idea of a random level We let each individual (girl) have her own level A gi... we bind these individual parameters (A gi and B gi ) together by normal distributions G = ( Agi B gi ) ( τ 2 a ω ω τ 2 b N 2 (( αg ) = β g ), G ) ( τ 2 a ρτ a τ b ρτ a τ b τ 2 b ) her own slope B gi but... G describes the population variation of the lines, i.e. the inter-individual variation (as seen on p. 53). 55 / 84 56 / 84

Estimation in random regression Output from random regression 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 vcorr; type=un in the random-statement refers to the matrix G on the previous slide 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 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 57 / 84 58 / 84 Output II: Estimated covariance and correlation Output III: Estimated mean value structure 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 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 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 0.... 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 0.... 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 cm 3 per half year, when giving calcium supplement. 59 / 84 60 / 84

Note concerning MIXED-notation Individual regressions approach 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, since it refers to visit=0). Merits: Easy to understand and interpret Drawbacks: Suboptimal in case of unequal sample sizes Only simple models feasible Difficult/impossible to include covariates 61 / 84 62 / 84 Random regression approach What to choose in this example? Merits: Uses all available information Optimal procedure if the model holds Easy to include covariates Drawbacks: Biased in case of informative missing values or informative sample sizes Random regression gives steeper slope almost identical levels at age 11 The girls with flat low profiles tend to be shorter: Why?? 63 / 84 64 / 84

Actually as it always happens Furthermore, 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 non-equidistant analogue to the autoregressive structure is Corr(Y git1, Y git2 ) = ρ t 1 t 2 which is written as TYPE=SP(POW)(ctime) 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! 65 / 84 66 / 84 Using 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; Iteration History Numerical instability The variable ctime has much too large values, with a very small range. We normalize, to approximate age or age11: age=(ctime-11475)/365.25+12; age11=age-11; /* intercept at age 11 */ Iteration Evaluations -2 Res Log Like Criterion 67 / 84 0 1-1221.35800531 1 2-2316.64715219 0.02023229 2 1-2316.64847895 0.02011117 3 1-2316.64847962 0.02010938 48 1-2317.30142030 0.01737561 49 1-2317.30142036 0.01737561 50 1-2317.30142043 0.01737561 WARNING: Did not converge. 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 ------------------------------------------------------- 68 / 84

Random regression, using actual age Intercept at age 11: 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; 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 Random regression, covariate age11: Estimated V Correlation Matrix for girl(grp) 101 C Row Col1 Col2 Col3 Col4 Col5 69 / 84 y git = A gi + B gi (age-11) + ε git 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 70 / 84 Results from random regression 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 0.... \ 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 0.... \ In this model, we quantify the effect of a calcium supplement to 0.0089 (0.0031) g per cm 3 per year. 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 (p. 54): 71 / 84 72 / 84

Comparison of slopes for different covariance structures Reparametrization, intercept at age 13 Covariance 2 log L Cov.par. Difference structure in slopes P Independence -1245.0 1 0.0094 (0.0086) 0.27 Compound -2251.7 2 0.0089 (0.0020) < 0.0001 Symmetry Power -2372.0 2 0.0094 (0.0032) 0.0038 (Autoregressive) Random -2350.1 4 0.0089 (0.0031) 0.0048 Regression Using age13=age-13 as covariate, and no baseline yet: 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; 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 0.... 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 0.... Estimated gain at the age 13: 0.0289 (0.0140) g per cm 3 73 / 84 74 / 84 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). 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 Baseline adjustment? 75 / 84 76 / 84

Hypothetical comparison of two treatment groups, A Hypothetical comparison of two treatment groups, B Truth: Constant difference between the treatments Finding: Interaction between time and treatment Truth: No effect of treatment Finding: Constant difference between treatments 77 / 84 78 / 84 Baseline difference I: Observational studies Research question: Compare the outcomes for individuals from different groups (e.g. gender or illness groups): The groups are likely to differ in many respects, including baseline outcome value. Differences in the outcome may be due to any of these characteristics, and the answer will depend on which of these are included in the model. Adjust for the covariates that are sensible in the context. The scientific question answered depends upon the model 79 / 84 Baseline difference II: Randomized studies Research question: Compare the outcomes for individuals treated differently, but otherwise identical (with respect to all baseline characteristics, including baseline outcome value): There ought to be no difference in either covariates or baseline outcome. Even so, small chance differences in baseline may create important outcome differences that may erroneously be taken to be treatment effects, if the covariate (or baseline) is highly predictive of the outcome. Use baseline measurement as a covariate (Ancova) to adjust for chance differences. Adjust also for other important covariates. The scientific question answered depends upon the model 80 / 84

Approaches for handling baseline Excluding baseline (4 follow-up visits only) in randomized studies 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 (Ancova) - may be used for any degree of correlation and gives the most sensible interpretation 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; 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 0.... 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 0.... Estimated gain at the age 13: 0.0247 (0.0138) g per cm 3 81 / 84 82 / 84 Including baseline as covariate Effect of 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; 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 0.... 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 0.... 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! Estimated gain at the age 13: 0.0173 (0.0062) g per cm 3 83 / 84 84 / 84