Topic 31: Two-way Random Effects Models

Slides:



Advertisements
Similar presentations
Randomized Complete Block and Repeated Measures (Each Subject Receives Each Treatment) Designs KNNL – Chapters 21,
Advertisements

1 Regression as Moment Structure. 2 Regression Equation Y =  X + v Observable Variables Y z = X Moment matrix  YY  YX  =  YX  XX Moment structure.
Topic 12: Multiple Linear Regression
A. The Basic Principle We consider the multivariate extension of multiple linear regression – modeling the relationship between m responses Y 1,…,Y m and.
SPH 247 Statistical Analysis of Laboratory Data 1April 2, 2013SPH 247 Statistical Analysis of Laboratory Data.
Topic 32: Two-Way Mixed Effects Model. Outline Two-way mixed models Three-way mixed models.
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
Multifactor Experiments November 26, 2013 Gui Citovsky, Julie Heymann, Jessica Sopp, Jin Lee, Qi Fan, Hyunhwan Lee, Jinzhu Yu, Lenny Horowitz, Shuvro Biswas.
Topic 3: Simple Linear Regression. Outline Simple linear regression model –Model parameters –Distribution of error terms Estimation of regression parameters.
Be humble in our attribute, be loving and varying in our attitude, that is the way to live in heaven.
Purpose to compare average response among levels of the factors Chapters 2-4 -predict future response at specific factor level -recommend best factor.
Biostatistics-Lecture 9 Experimental designs Ruibin Xi Peking University School of Mathematical Sciences.
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)
1 Experimental Statistics - week 4 Chapter 8: 1-factor ANOVA models Using SAS.
Topic 2: An Example. Leaning Tower of Pisa Construction began in 1173 and by 1178 (2 nd floor), it began to sink Construction resumed in To compensate.
G Lecture 5 Example fixed Repeated measures as clustered data
1 1 Slide © 2004 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
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.
Discussion 3 1/20/2014. Outline How to fill out the table in the appendix in HW3 What does the Model statement do in SAS Proc GLM ( please download lab.
Topic 17: Interaction Models. Interaction Models With several explanatory variables, we need to consider the possibility that the effect of one variable.
The Completely Randomized Design (§8.3)
Simple Linear Regression ANOVA for regression (10.2)
Hormone Example: nknw892.sas Y = change in growth rate after treatment Factor A = gender (male, female) Factor B = bone development level (severely depressed,
BUSI 6480 Lecture 8 Repeated Measures.
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.
Environmental Modeling Basic Testing Methods - Statistics III.
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.
1 Experimental Statistics Spring week 6 Chapter 15: Factorial Models (15.5)
Sigmoidal Response (knnl558.sas). Programming Example: knnl565.sas Y = completion of a programming task (1 = yes, 0 = no) X 2 = amount of programming.
Topic 20: Single Factor Analysis of Variance. Outline Analysis of Variance –One set of treatments (i.e., single factor) Cell means model Factor effects.
Copyright © Cengage Learning. All rights reserved. 11 Multifactor Analysis of Variance.
Example 1 (knnl917.sas) Y = months survival Treatment (3 levels)
1 Statistics 262: Intermediate Biostatistics Regression Models for longitudinal data: Mixed Models.
Inference for regression - More details about simple linear regression IPS chapter 10.2 © 2006 W.H. Freeman and Company.
CRD, Strength of Association, Effect Size, Power, and Sample Size Calculations BUSI 6480 Lecture 4.
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.
G Lecture 71 Revisiting Hierarchical Mixed Models A General Version of the Model Variance/Covariances of Two Kinds of Random Effects Parameter Estimation.
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.
1 Experimental Statistics - week 12 Chapter 11: Linear Regression and Correlation Chapter 12: Multiple Regression.
INTRODUCTION TO MULTIPLE REGRESSION MULTIPLE REGRESSION MODEL 11.2 MULTIPLE COEFFICIENT OF DETERMINATION 11.3 MODEL ASSUMPTIONS 11.4 TEST OF SIGNIFICANCE.
Factorial Models Random Effects
Nested Designs Study vs Control Site.
Random and Mixed Effects ANOVA
Joanna Romaniuk Quanticate, Warsaw, Poland
Randomized Complete Block and Repeated Measures (Each Subject Receives Each Treatment) Designs KNNL – Chapters 21,
Random and Mixed Effects ANOVA
The Analysis of Variance
Multifactor Analysis of Variance
Experimental Statistics - week 8
Presentation transcript:

Topic 31: Two-way Random Effects Models

Outline Two-way random effects design Model F tests

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 Yijk is the kth observation in cell (i, j) k = 1 to nij Have balanced designs with n = nij

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 1 25.3 1 1 2 25.2 1 1 3 28.9 1 2 1 25.3 1 1 2 25.2 1 1 3 28.9 1 2 4 30.0 1 2 5 24.8 1 3 6 25.1 1 3 7 28.4 1 4 8 27.9 1 4 9 27.1 1 5 10 26.6 1 5

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;

Random effects model Yijk = μij + εijk the μij are N(μ, σμ2) the εijk are iid N(0, σ2) μij and εijk are independent Dependence among the Yijk can be most easily described by specifying the covariance matrix of the vector (Yijk)’

Random factor effects model Yijk = μ + i + j + ()ij + εijk i ~ N(0, σ2) j ~ N(0, σ2) ()ij ~ N(0, σ2) εij ~ N(0, σ2) σY2 = σ2 + σ2 + σ2 + σ2

Parameters There are five parameters in this model μ σ2 σ2 σ2 σ2 The cell means are random variables, not parameters

ANOVA table The terms and layout of the ANOVA table are the same as what we used for the fixed effects two-way model The expected mean squares (EMS) are different

EMS and parameter estimates E(MSA) = σ2 + bnσ2 + 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

Hypotheses H0A: σ2 = 0; H1A: σ2 ≠ 0 H0B: σ2 = 0; H1B : σ2 ≠ 0 H0AB : σ2 = 0; H1AB : σ2 ≠ 0

Hypothesis H0A H0A: σ2 = 0; H1A: σ2 ≠ 0 E(MSA) = σ2 + bnσ2 + nσ 2 E(MSE) = σ2 E(MSAB) = σ2 + nσ 2 So H0A is tested by F = MSA/MSAB with df a-1 and (a-1)(b-1)

Hypothesis H0B H0B: σ2 = 0; H1B: σ2 ≠ 0 E(MSB) = σ2 + anσ2 + nσ 2 E(MSAB) = σ2 + nσ 2 So H0B is tested by F = MSB/MSAB with df b-1 and (a-1)(b-1)

Hypothesis H0AB H0AB: σ 2 = 0; H1AB: σ2 ≠ 0 E(MSAB) = σ2 + nσ2 E(MSE) = σ2 So H0AB is tested by F = MSAB/MSE with df (a-1)(b-1) and ab(n-1)

Run proc glm proc glm data=a1; class driver car; model mpg=driver car random driver car driver*car/ test; run;

Model and error output Source DF Sum of Squares Mean Square F Value Pr > F Model 19 377.444750 19.8655132 113.03 <.0001 Error 20 3.5150000 0.1757500 Corrected Total 39 380.959750

Only the interaction test Factor effects output All using MSE in denominator Source DF Type I SS Mean Square F Value Pr > F driver 3 280.2847500 93.4282500 531.60 <.0001 car 4 94.7135000 23.6783750 134.73 driver*car 12 2.4465000 0.2038750 1.16 0.3715 Only the interaction test is valid here

Random statement output Source Type III Expected Mean Square driver Var(Error) + 2 Var(driver*car) + 10 Var(driver) car Var(Error) + 2 Var(driver*car) + 8 Var(car) driver*car Var(Error) + 2 Var(driver*car)

Random/test output Source DF Type III SS Mean Square F Value Pr > F driver 3 280.284750 93.428250 458.26 <.0001 car 4 94.713500 23.678375 116.14 Error 12 2.446500 0.203875 Error: MS(driver*car)

Random/test output Source DF Type III SS Mean Square F Value Pr > F driver*car 12 2.446500 0.203875 1.16 0.3715 Error: MS(Error) 20 3.515000 0.175750

Proc varcomp proc varcomp data=a1; class driver car; model mpg=driver car driver*car; run;

Output MIVQUE(0) Estimates Variance Component mpg Var(driver) 9.32244 Var(car) 2.93431 Var(driver*car) 0.01406 Var(Error) 0.17575

Covariance Parameter Estimates MIXED Output Fit Statistics -2 Res Log Likelihood 86.8 AIC (smaller is better) 94.8 AICC (smaller is better) 96.0 BIC (smaller is better) 93.2 Covariance Parameter Estimates Cov Parm Estimate car 2.9343 driver 9.3224 car*driver 0.01406 Residual 0.1757 DEFAULT: F-tests only supplied for fixed effects

Estimated V Correlation Matrix for Subject 1 Row Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 Col11 Col12 Col13 Col14 Col15 1 1.0000 0.9859 0.7490 0.2358 2 3 4 5 6

Covariances/Correlations

Using Proc Mixed proc mixed data=a1 covtest; class car driver; model mpg=; random car driver car*driver/vcorr; run;

Covariance Parameter Estimates MIXED Output Covariance Parameter Estimates Cov Parm Estimate Standard Error Z Value Pr > Z car 2.9343 2.0929 1.40 0.0805 driver 9.3224 7.6284 1.22 0.1108 car*driver 0.01406 0.05004 0.28 0.3893 Residual 0.1757 0.05558 3.16 0.0008

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