Mixed Models Lecture Notes By Dr. Hanford page 199 More Statistics& SAS Tutorial at

Similar documents
Topic 28: Unequal Replication in Two-Way ANOVA

Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models:

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

STA 303H1F: Two-way Analysis of Variance Practice Problems

This is a Randomized Block Design (RBD) with a single factor treatment arrangement (2 levels) which are fixed.

Introduction to Crossover Trials

EXST 7015 Fall 2014 Lab 11: Randomized Block Design and Nested Design

This is a Split-plot Design with a fixed single factor treatment arrangement in the main plot and a 2 by 3 factorial subplot.

Differences of Least Squares Means

or treatments in several periods. The

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

SAS Commands. General Plan. Output. Construct scatterplot / interaction plot. Run full model

Introduction to SAS proc mixed

STAT 705 Chapter 16: One-way ANOVA

Introduction to SAS proc mixed

Topic 32: Two-Way Mixed Effects Model

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

STAT 705 Generalized linear mixed models

Topic 29: Three-Way ANOVA

SAS Syntax and Output for Data Manipulation:

Repeated Measures Data

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

Poisson Data. Handout #4

General Linear Model (Chapter 4)

Repeated Measures Part 2: Cartoon data

Mixed models with correlated measurement errors

Odor attraction CRD Page 1

Chapter 8 (More on Assumptions for the Simple Linear Regression)

dm'log;clear;output;clear'; options ps=512 ls=99 nocenter nodate nonumber nolabel FORMCHAR=" = -/\<>*"; ODS LISTING;

Analysis of Covariance

Using PROC GENMOD to Analyse Ratio to Placebo in Change of Dactylitis. Irmgard Hollweck / Meike Best 13.OCT.2013

Mixed Model: Split plot with two whole-plot factors, one split-plot factor, and CRD at the whole-plot level (e.g. fancier split-plot p.

Descriptions of post-hoc tests

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

ANOVA Longitudinal Models for the Practice Effects Data: via GLM

DETERMINATION OF RESPONSE SURFACE FUNCTION USING REPEATED MEASURES

Sample Size / Power Calculations

17. Example SAS Commands for Analysis of a Classic Split-Plot Experiment 17. 1

Lecture 10. Factorial experiments (2-way ANOVA etc)

Models for longitudinal data

Topic 20: Single Factor Analysis of Variance

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

STAT 705 Chapters 22: Analysis of Covariance

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

Analysis of Variance. Source DF Squares Square F Value Pr > F. Model <.0001 Error Corrected Total

Random Intercept Models

STA441: Spring Multiple Regression. More than one explanatory variable at the same time

Outline. Topic 22 - Interaction in Two Factor ANOVA. Interaction Not Significant. General Plan

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

CHL 5225 H Crossover Trials. CHL 5225 H Crossover Trials

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

Cross-Over Design Experiment (Using SAS)

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

T-test: means of Spock's judge versus all other judges 1 12:10 Wednesday, January 5, judge1 N Mean Std Dev Std Err Minimum Maximum

Mixed Model: Split plot with two whole-plot factors, one split-plot factor, and CRD at the whole-plot level (e.g. fancier split-plot p.

Multivariate analysis of variance and covariance

BIOSTATISTICAL METHODS

STA 303H1F: Two-way Analysis of Variance Practice Problems

1 Tomato yield example.

13. The Cochran-Satterthwaite Approximation for Linear Combinations of Mean Squares

Lecture 8 Stat D. Gillen

Application of Ghosh, Grizzle and Sen s Nonparametric Methods in. Longitudinal Studies Using SAS PROC GLM

1. (Rao example 11.15) A study measures oxygen demand (y) (on a log scale) and five explanatory variables (see below). Data are available as

Lecture 10: Experiments with Random Effects

Analysis of repeated measurements (KLMED8008)

Two-factor studies. STAT 525 Chapter 19 and 20. Professor Olga Vitek

Analysis of Covariance

Epidemiology Principle of Biostatistics Chapter 11 - Inference about probability in a single population. John Koval

REPEATED MEASURES. Copyright c 2012 (Iowa State University) Statistics / 29

unadjusted model for baseline cholesterol 22:31 Monday, April 19,

Lecture 11: Nested and Split-Plot Designs

Analysis of variance and regression. May 13, 2008

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

STATISTICS 174: APPLIED STATISTICS TAKE-HOME FINAL EXAM POSTED ON WEBPAGE: 6:00 pm, DECEMBER 6, 2004 HAND IN BY: 6:00 pm, DECEMBER 7, 2004 This is a

Joint Modeling of Longitudinal Item Response Data and Survival

Name: Biostatistics 1 st year Comprehensive Examination: Applied in-class exam. June 8 th, 2016: 9am to 1pm

A SAS Macro to Diagnose Influential Subjects in Longitudinal Studies

Incomplete Block Designs

Analysis of variance and regression. April 17, Contents Comparison of several groups One-way ANOVA. Two-way ANOVA Interaction Model checking

171:162 Design and Analysis of Biomedical Studies, Summer 2011 Exam #3, July 16th

2 >1. That is, a parallel study design will require

Answer to exercise: Blood pressure lowering drugs

Multistate models and recurrent event models

Lecture 27 Two-Way ANOVA: Interaction

4.1 Computing section Example: Bivariate measurements on plants Post hoc analysis... 7

Mixed-Effects Pattern-Mixture Models for Incomplete Longitudinal Data. Don Hedeker University of Illinois at Chicago

Outline. Topic 20 - Diagnostics and Remedies. Residuals. Overview. Diagnostics Plots Residual checks Formal Tests. STAT Fall 2013

STAT 5200 Handout #26. Generalized Linear Mixed Models

Analysis of variance. April 16, Contents Comparison of several groups

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

Analysis of variance. April 16, 2009

Mixed Models for Longitudinal Binary Outcomes. Don Hedeker Department of Public Health Sciences University of Chicago.

ST4241 Design and Analysis of Clinical Trials Lecture 4: 2 2 factorial experiments, a special cases of parallel groups study

UNIVERSITY OF TORONTO Faculty of Arts and Science

Means or "expected" counts: j = 1 j = 2 i = 1 m11 m12 i = 2 m21 m22 True proportions: The odds that a sampled unit is in category 1 for variable 1 giv

Topic 25 - One-Way Random Effects Models. Outline. Random Effects vs Fixed Effects. Data for One-way Random Effects Model. One-way Random effects

Variance components and LMMs

Multi-factor analysis of variance

Beyond GLM and likelihood

OHSU OGI Class ECE-580-DOE :Design of Experiments Steve Brainerd

Transcription:

Mixed Models Lecture Notes By Dr. Hanford page 199 Variance Balance Cross-Over Designs Variance balance cross-over designs are designs where all treatment contrasts have the same precision and all carry-over contrasts have the same precision. There are a large number of designs that meet these criteria. Patterson and Lucas catalogued many of these designs in 1962. The "Cross-Over Experiment" textbook by Ratkowsky, Evans, and Alldredge, 1993 present all of the Patterson-Lucas designs in Appendix 5.A. They also include efficiencies of the designs. Example of Variance Balance Cross-Over Design The following study used a digram-balanced Latin squares design. This design is designated PL2 in the "Cross-Over Experiment" textbook. Cochran and Cox originally presented this design in 1957. Square 1 2 Patient A B C D E F 1 Placebo Test Placebo Test Period 2 Placebo Test Test Placebo 3 Test Placebo Placebo Test This study was designed to compare the effects on heart rate of three treatments (placebo, standard, and test). Each sequence was randomly assigned to four patients each. Heart rate was measured one hour after each treatment. The model for this study is the following: y e ijk i i( k) j t( ij) j r( ij) ijk μ = mean γ i = sequence effect for sequence i ξ i(k) = random subject effect nested within sequence π j = period effect for period j τ t(ij) = direct treatment effect for treatment t λ r(ij) = the first-order carryover effect due to treatment r, where r is the treatment applied the previous period δ j = an indicator variable: 0 if it is the first period 1 if the period is greater than 1 There are a couple of different ways that the carryover effect can be coded in a dataset. The first way is having only one carryover class variable. For example, for the first two patients in this study, the data with the carryover coded this way would look like with the first period carry coded to N. In addition, there is the delta indicator variable, coded as described above. Note that the period variable is coded 2, 3, 4, rather than 1, 2, 3. This is because the period refers to the original visit schedule and the first visit was a pretreatment, baseline visit.

Mixed Models Lecture Notes By Dr. Hanford page 200 Obs patient sequence period basehr hr drug CARRY delta 1 1 B 2 86 86 P N 0 2 1 B 3 86 106 T P 1 3 1 B 4 62 79 S T 1 4 2 F 2 48 66 T N 0 5 2 F 3 58 56 P T 1 6 2 F 4 74 79 S P 1 You can also explicitly create covariates for the carryover effects of specific treatments. Because we have three treatments, we can set up covariates for two of them: CARRYT for the carryover effect of the test treatment and CARRYS for the carryover effect of the standard treatment. The linear model for this would be y e ijk i i( k) j t( ij) j s( ij) j e( ij) ijk which is the same model we had before, except that now, we are separating out the coefficients for the two covariates: s(ij) is for the carryover effect for the standard treatment, while e(ij) is for the carryover effect for the test treatment. The values that carryt and carrys take are either 0, 1, or -1, depending on the previous periods treatment. The three carryover effects have a sum to zero constraint. 0 p s e If we move the placebo carryover effect to the other side of the equation and multiply both sides by -1, we get the following: p s e Therefore, the placebo carryover effect can be represented by -1 in the CARRYT and CARRYS values. The first patient received the placebo treatment the first period. For the first period, because there is no carryover, both covariates are set to 0. The second period, the patient receives the test treatment. Because placebo was given the first period, the CARRYS and CARRYT values will both be -1. For the third period, the CARRYT value is 1, because the test treatment was given the previous period. The second patient received the standard treatment the first period, placebo the second period and the test treatment the third period. For period 2, the CARRYS value is 1, while the CARRYT value is 0. Because placebo was given the second period, both the CARRYS and CARRYT values are -1 for the third period. Following is a printout of the first two patients. Obs patient sequence period basehr hr drug carryt carrys 1 1 B 2 86 86 P 0 0

Mixed Models Lecture Notes By Dr. Hanford page 201 2 1 B 3 86 106 T -1-1 3 1 B 4 62 79 S 1 0 4 2 F 2 48 66 T 0 0 5 2 F 3 58 56 P 1 0 6 2 F 4 74 79 S -1-1 First the two datasets are read into SAS: option ps=67 ls=67; filename cc 'C:\users\kathy\statistics department\statistics 892- mixed models\cochran-cox-crossover.dat'; filename cc2 'C:\users\kathy\statistics department\statistics 892- mixed models\cochran-cox-carry.dat'; data hrtrate; infile cc; input patient sequence $ period basehr hr drug $ carryt carrys; data hrtrate2; infile cc2; input patient sequence $ period basehr hr drug $ CARRY $; delta=(carry^='n'); if carry='n' then carryc='p'; else carryc=carry; Data hrtrate is the dataset we will use for the two covariate analysis and hrtrate2 is the dataset we will use for the carryover as a classification effect analysis. Note that for the hrtrate2 dataset, we are creating the indicator variable delta, which is 0 when it is the first period (carry= N ) and 1 otherwise. Note that we are creating a new variable carryc which is arbitrarily set to P if carry= N and set to the carry value otherwise. Otherwise, because N appears only in Period 2, we would run into problems of nonestimability. We could have recoded N to any of the other treatment codes and ended up with the same results. We'll run the analysis with the carryover effect treated as a classification (first dataset) and with the carryover effects as the two covariates (second dataset). Following is the SAS code. Note that just as the linear model specifies, there is a carryc*delta term. Because the delta term is not a class variable, we have to use estimate statements in order to look at the differences in the carryover effects among the treatments. *analysis using delta indicator variable for the carry effect; proc mixed data=hrtrate2; class patient sequence period carryc drug; model hr = sequence period drug carryc*delta/solution ; random patient(sequence); estimate 'carry P-S' carryc*delta 1-1 0; estimate 'carry P-T' carryc*delta 1 0-1; estimate 'carry S-T' carryc*delta 0 1-1; lsmeans drug/pdiff;

Mixed Models Lecture Notes By Dr. Hanford page 202 Following are the solutions for the fixed effects. Solution for Fixed Effects Effect sequence carryc drug period Estimate Error Intercept 81.0625 5.4737 sequence A 1.7083 6.6802 sequence B 1.5000 6.5915 sequence C 3.0208 6.6802 sequence D 8.8542 6.6802 sequence E 7.5417 6.6802 sequence F 0. period 2-2.8125 2.8702 period 3 0.7500 2.1697 period 4 0. drug P -5.9375 2.4258 drug S -3.6250 2.4258 drug T 0. delta*carryc P 3.9375 3.2545 delta*carryc S -4.6250 3.2545 delta*carryc T 0. Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F sequence 5 18 0.58 0.7165 period 1 42 0.12 0.7313 drug 2 42 3.04 0.0583 delta*carryc 2 42 3.47 0.0404 Note that there is a significant carryover effect and that the drug effect is approaching significance.

Mixed Models Lecture Notes By Dr. Hanford page 203 Estimates Label Estimate Error DF t Value Pr > t carry P-S 8.5625 3.2545 42 2.63 0.0119 carry P-T 3.9375 3.2545 42 1.21 0.2331 carry S-T -4.6250 3.2545 42-1.42 0.1627 Least Squares Means Effect drug Estimate Error DF t Value Pr > t drug P 78.0556 2.3626 42 33.04 <.0001 drug S 80.3681 2.3626 42 34.02 <.0001 drug T 83.9931 2.3626 42 35.55 <.0001 Differences of Least Squares Means Effect drug _drug Estimate Error DF t Value Pr > t drug P S -2.3125 2.4258 42-0.95 0.3459 drug P T -5.9375 2.4258 42-2.45 0.0186 drug S T -3.6250 2.4258 42-1.49 0.1426 The carryover effect of the standard treatment is significantly different from the carryover effect from the placebo treatment, where the heart rate in a period following a period with placebo treatment is significantly faster than the heart rate in a period following a period with the standard treatment. We will now rerun the analysis using the two covariate model using the following SAS code *analysis using the two carry variables with the 0 1, and -1 values; proc mixed data=hrtrate; class patient sequence period drug; model hr = sequence period drug carrys carryt/solution; random patient(sequence); lsmeans drug/pdiff; Following are the solutions and least squares means. Solution for Fixed Effects Effect sequence drug period Estimate Error DF Intercept 80.8333 5.0254 18

Mixed Models Lecture Notes By Dr. Hanford page 204 sequence A 1.7083 6.6802 18 sequence B 1.5000 6.5915 18 sequence C 3.0208 6.6802 18 sequence D 8.8542 6.6802 18 sequence E 7.5417 6.6802 18 sequence F 0.. period 2-2.5833 2.1697 42 period 3 0.7500 2.1697 42 period 4 0.. drug P -5.9375 2.4258 42 drug S -3.6250 2.4258 42 drug T 0.. carrys -4.3958 1.8790 42 carryt 0.2292 1.8790 42 Note that these results are the same as the results from the previous analysis, except for the intercept and the carrys and carryt. Because of the sum to zero constraint, the intercept for this model is shifted by the estimate of the carryt effect. We can verify this by adding the intercept and carryt estimates 80.8333+.2292=81.0625 which is the estimate of the intercept for the first analysis. We can calculate the differences in carryover effects using the sum to zero constraint for determining the carryp effect and then taking the differences: carryp= -carrys-carryt=4.3958-.2292=4.1666 carry P-S = 4.1666-(-4.3958)=8.5624 carry P-T = 4.1666-.2292=3.9374 carry S-T = -4.3958-.2292=-4.625 These agree with the results from the previous analysis Estimates Label Estimate Error DF t Value Pr > t carry P-S 8.5625 3.2545 42 2.63 0.0119 carry P-T 3.9375 3.2545 42 1.21 0.2331 carry S-T -4.6250 3.2545 42-1.42 0.1627 Least Squares Means Effect drug Estimate Error DF t Value Pr > t drug P 78.0556 2.3626 42 33.04 <.0001 drug S 80.3681 2.3626 42 34.02 <.0001 drug T 83.9931 2.3626 42 35.55 <.0001 Differences of Least Squares Means

Mixed Models Lecture Notes By Dr. Hanford page 205 Effect drug _drug Estimate Error DF t Value Pr > t drug P S -2.3125 2.4258 42-0.95 0.3459 drug P T -5.9375 2.4258 42-2.45 0.0186 drug S T -3.6250 2.4258 42-1.49 0.1426 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F sequence 5 18 0.58 0.7165 period 2 42 1.30 0.2835 drug 2 42 3.04 0.0583 carrys 1 42 5.47 0.0241 carryt 1 42 0.01 0.9035 The least square means for the treatment effects and the tests of the fixed effects of sequence, period and drug are also the same as the previous analysis.