Topic 32: Two-Way Mixed Effects Model. Outline Two-way mixed models Three-way mixed models.

Slides:



Advertisements
Similar presentations
Topic 12: Multiple Linear Regression
Advertisements

Factorial Models Random Effects Random Effects Gauge R&R studies (Repeatability and Reproducibility) have been an expanding area of application Gauge R&R.
Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture #19 Analysis of Designs with Random Factor Levels.
1 Chapter 4 Experiments with Blocking Factors The Randomized Complete Block Design Nuisance factor: a design factor that probably has an effect.
Chapter 4 Randomized Blocks, Latin Squares, and Related Designs
Weekend Workshop I PROC MIXED. Random or Fixed ?RANDOMFIXEDLevels: Selected at random from infinite population Finite number of possibilities Another.
Hierarchical (nested) ANOVA. In some two-factor experiments the level of one factor, say B, is not “cross” or “cross classified” with the other factor,
Topic 3: Simple Linear Regression. Outline Simple linear regression model –Model parameters –Distribution of error terms Estimation of regression parameters.
Some Terms Y =  o +  1 X Regression of Y on X Regress Y on X X called independent variable or predictor variable or covariate or factor Which factors.
Design of Engineering Experiments - Experiments with Random Factors
Chapter 5 Introduction to Factorial Designs
1 Multifactor ANOVA. 2 What We Will Learn Two-factor ANOVA K ij =1 Two-factor ANOVA K ij =1 –Interaction –Tukey’s with multiple comparisons –Concept of.
Be humble in our attribute, be loving and varying in our attitude, that is the way to live in heaven.
Every achievement originates from the seed of determination. 1Random Effect.
Experimental Design Terminology  An Experimental Unit is the entity on which measurement or an observation is made. For example, subjects are experimental.
1 Chapter 5 Introduction to Factorial Designs Basic Definitions and Principles Study the effects of two or more factors. Factorial designs Crossed:
Chap 10-1 Analysis of Variance. Chap 10-2 Overview Analysis of Variance (ANOVA) F-test Tukey- Kramer test One-Way ANOVA Two-Way ANOVA Interaction Effects.
Topic 28: Unequal Replication in Two-Way ANOVA. Outline Two-way ANOVA with unequal numbers of observations in the cells –Data and model –Regression approach.
1 Experimental Statistics - week 7 Chapter 15: Factorial Models (15.5) Chapter 17: Random Effects Models.
© 2002 Prentice-Hall, Inc.Chap 14-1 Introduction to Multiple Regression Model.
1 Experimental Statistics - week 6 Chapter 15: Randomized Complete Block Design (15.3) Factorial Models (15.5)
Chapter 13Design & Analysis of Experiments 8E 2012 Montgomery 1.
1 Experimental Statistics - week 4 Chapter 8: 1-factor ANOVA models Using SAS.
G Lecture 5 Example fixed Repeated measures as clustered data
1 Design of Engineering Experiments Part 10 – Nested and Split-Plot Designs Text reference, Chapter 14, Pg. 525 These are multifactor experiments that.
23-1 Analysis of Covariance (Chapter 16) A procedure for comparing treatment means that incorporates information on a quantitative explanatory variable,
Topic 7: Analysis of Variance. Outline Partitioning sums of squares Breakdown degrees of freedom Expected mean squares (EMS) F test ANOVA table General.
Lecture 4 SIMPLE LINEAR REGRESSION.
Topic 14: Inference in Multiple Regression. Outline Review multiple linear regression Inference of regression coefficients –Application to book example.
1 Experimental Statistics - week 10 Chapter 11: Linear Regression and Correlation Note: Homework Due Thursday.
Randomized Block Design (Kirk, chapter 7) BUSI 6480 Lecture 6.
5-5 Inference on the Ratio of Variances of Two Normal Populations The F Distribution We wish to test the hypotheses: The development of a test procedure.
STA305 week 51 Two-Factor Fixed Effects Model The model usually used for this design includes effects for both factors A and B. In addition, it includes.
The Completely Randomized Design (§8.3)
DOX 6E Montgomery1 Design of Engineering Experiments Part 9 – Experiments with Random Factors Text reference, Chapter 13, Pg. 484 Previous chapters have.
1 Every achievement originates from the seed of determination.
Topic 23: Diagnostics and Remedies. Outline Diagnostics –residual checks ANOVA remedial measures.
1 Experimental Statistics - week 14 Multiple Regression – miscellaneous topics.
Topic 30: Random Effects. Outline One-way random effects model –Data –Model –Inference.
Topic 25: Inference for Two-Way ANOVA. Outline Two-way ANOVA –Data, models, parameter estimates ANOVA table, EMS Analytical strategies Regression approach.
Topic 26: Analysis of Covariance. Outline One-way analysis of covariance –Data –Model –Inference –Diagnostics and rememdies Multifactor analysis of covariance.
PSYC 3030 Review Session April 19, Housekeeping Exam: –April 26, 2004 (Monday) –RN 203 –Use pencil, bring calculator & eraser –Make use of your.
1 The Two-Factor Mixed Model Two factors, factorial experiment, factor A fixed, factor B random (Section 13-3, pg. 495) The model parameters are NID random.
ETM U 1 Analysis of Variance (ANOVA) Suppose we want to compare more than two means? For example, suppose a manufacturer of paper used for grocery.
1 Experimental Statistics - week 9 Chapter 17: Models with Random Effects Chapter 18: Repeated Measures.
Topic 24: Two-Way ANOVA. Outline Two-way ANOVA –Data –Cell means model –Parameter estimates –Factor effects model.
Correlated-Samples ANOVA The Univariate Approach.
1 Experimental Statistics Spring week 6 Chapter 15: Factorial Models (15.5)
Topic 20: Single Factor Analysis of Variance. Outline Analysis of Variance –One set of treatments (i.e., single factor) Cell means model Factor effects.
Chapter 4 Analysis of Variance
Copyright © Cengage Learning. All rights reserved. 11 Multifactor Analysis of Variance.
The Mixed Effects Model - Introduction In many situations, one of the factors of interest will have its levels chosen because they are of specific interest.
1 An example of a more complex design (a four level nested anova) 0 %, 20% and 40% of a tree’s roots were cut with the purpose to study the influence.
Experimental Statistics - week 9
Topic 29: Three-Way ANOVA. Outline Three-way ANOVA –Data –Model –Inference.
Interview Example: nknw964.sas Y = rating of a job applicant Factor A represents 5 different personnel officers (interviewers) n = 4.
Topic 27: Strategies of Analysis. Outline Strategy for analysis of two-way studies –Interaction is not significant –Interaction is significant What if.
Topic 22: Inference. Outline Review One-way ANOVA Inference for means Differences in cell means Contrasts.
Topic 21: ANOVA and Linear Regression. Outline Review cell means and factor effects models Relationship between factor effects constraint and explanatory.
1 Experimental Statistics - week 8 Chapter 17: Mixed Models Chapter 18: Repeated Measures.
Two-Factor Study with Random Effects In some experiments the levels of both factors A & B are chosen at random from a larger set of possible factor levels.
1 Chapter 5.8 What if We Have More Than Two Samples?
Today: Feb 28 Reading Data from existing SAS dataset One-way ANOVA
Factorial Models Random Effects
Two-way ANOVA problems
Chapter 5 Introduction to Factorial Designs
Topic 31: Two-way Random Effects Models
ANOVA Analysis of Variance.
Experimental Statistics - week 8
Two-way ANOVA problems
Presentation transcript:

Topic 32: Two-Way Mixed Effects Model

Outline Two-way mixed models Three-way mixed models

Data for two-way design Y is the response variable Factor A with levels i = 1 to a Factor B with levels j = 1 to b Y ijk is the k th observation in cell (i, j) k = 1 to n ij Have balanced designs with n = n ij

Two-way mixed model Two-way mixed model has –One fixed effect –One random effect Tests: –Again use EMS as guide –Two possible models Unrestricted mixed model (SAS) Restricted mixed model (Text)

KNNL Example KNNL Problem 25.15, p 1080 Y is fuel efficiency in miles per gallon Factor A represents four different drivers, a=4 levels Factor B represents five different cars of the same model, b=5 Each driver drove each car twice over the same 40-mile test course

Read and check the data data a1; infile 'c:\...\CH25PR15.TXT'; input mpg driver car; proc print data=a1; run;

The data Obs mpg driver car

Prepare the data for a plot data a1; set a1; if (driver eq 1)*(car eq 1) then dc='01_1A'; if (driver eq 1)*(car eq 2) then dc='02_1B'; ⋮ if (driver eq 4)*(car eq 5) then dc='20_4E';

Plot the data title1 'Plot of the data'; symbol1 v=circle i=none c=black; proc gplot data=a1; plot mpg*dc/frame; run;

Find the means proc means data=a1; output out=a2 mean=avmpg; var mpg; by driver car;

Plot the means title1 'Plot of the means'; symbol1 v='A' i=join c=black; symbol2 v='B' i=join c=black; symbol3 v='C' i=join c=black; symbol4 v='D' i=join c=black; symbol5 v='E' i=join c=black; proc gplot data=a2; plot avmpg*driver=car/frame; run;

Example Revisited Suppose that the four drivers were not randomly selected and there is interest in comparing the four drivers in the study Driver (A) is now a fixed effect Still consider Car (B) to be a random effect

Mixed effects model (unrestricted) Y ijk = μ +  i +  j + (  ) ij + ε ijk Σ  i =0 (unknown constants)  j ~ N(0, σ  2 ) (  ) ij ~ N(0, σ  2 ) ε ij ~ N(0, σ 2 ) σ Y 2 = σ  2 + σ  2 + σ 2

Mixed effects model (restricted) Y ijk = μ +  i +  j + (  ) ij + ε ijk Σ  i =0 (unknown constants) Σ(  b) ij =0 for all j ε ij ~ N(0, σ 2 ) σ Y 2 = σ  2 + ((a-1)/a) σ  2 + σ 2

Parameters There are a+3 parameters in this model –a fixed effects means –σ  2 –σ  2 –σ 2

ANOVA table The terms and layout of the ANOVA table are the same as what we used for the fixed effects model The expected mean squares (EMS) are different and vary based on the choice of unrestricted or restricted mixed model

EMS (unrestricted) E(MSA) = σ 2 + bnΣ  i 2 /(a-1)+ n σ  2 E(MSB) = σ 2 + an σ  2 + n σ  2 E(MSAB) = σ 2 + n σ  2 E(MSE) = σ 2 Estimates of the variance components can be obtained from these equations, replacing E(MS) with table value, or other methods such as ML

EMS (restricted) E(MSA) = σ 2 + bnΣ  i 2 /(a-1)+ n σ  2 E(MSB) = σ 2 + an σ  2 E(MSAB) = σ 2 + n σ  2 E(MSE) = σ 2 Estimates of the variance components can be obtained from these equations, replacing E(MS) with table value, or other methods such as ML Diff here

Hypotheses (unrestricted) H 0A : σ  2 = 0; H 1A : σ  2 ≠ 0 –H 0A is tested by F = MSA/MSAB with df a-1 and (a-1)(b-1) H 0B : σ  2 = 0; H 1B : σ  2 ≠ 0 –H 0B is tested by F = MSB/MSAB with df b-1 and (a-1)(b-1) H 0AB : σ  2 = 0; H 1AB : σ  2 ≠ 0 –H 0AB is tested by F = MSAB/MSE with df (a-1)(b-1) and ab(n-1)

Hypotheses (restricted) H 0A : σ  2 = 0; H 1A : σ  2 ≠ 0 –H 0A is tested by F = MSA/MSAB with df a-1 and (a-1)(b-1) H 0B : σ  2 = 0; H 1B : σ  2 ≠ 0 –H 0B is tested by F = MSB/MSE with df b-1 and ab(n-1) H 0AB : σ  2 = 0; H 1AB : σ  2 ≠ 0 –H 0AB is tested by F = MSAB/MSE with df (a-1)(b-1) and ab(n-1)

Comparison of Means To compare fixed levels of A, std error is Degrees of freedom for t tests and CIs are then (a-1)(b-1) This is true for both unrestricted and restricted mixed models

Using Proc Mixed proc mixed data=a1; class car driver; model mpg=driver; random car car*driver / vcorr; lsmeans driver / adjust=tukey; run; SAS considers unrestricted model only…results in slightly different variance estimates

SAS Output Covariance Parameter Estimates Cov ParmEstimate car car*driver Residual Type 3 Tests of Fixed Effects Effect Num DF Den DFF ValuePr > F driver <.0001

SAS Output Least Squares Means EffectdriverEstimate Standard ErrorDFt ValuePr > |t| driver <.0001 driver <.0001 driver <.0001 driver <.0001

SAS Output Differences of Least Squares Means Effectdriver_driverEstiate Standard ErrorDFt ValuePr > |t|AdjustmentAdj P driver <.0001 Tukey- Kramer <.0001 driver <.0001 Tukey- Kramer <.0001 driver <.0001 Tukey- Kramer <.0001 driver <.0001 Tukey- Kramer <.0001 driver <.0001 Tukey- Kramer <.0001 driver <.0001Tukey- Kramer <.0001

Three-way models We can have zero, one, two, or three random effects EMS indicate how to do tests In some cases the situation is complicated and we need approximations of an F test, e.g. when all are random, use MS(AB)+MS(AC)- MS(ABC) to test A

Last slide Finish reading KNNL Chapter 25 We used program topic32.sas to generate the output for today