1 Introduction to mixed models Ulf Olsson Unit of Applied Statistics and Mathematics.

Slides:



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

Analysis of variance and statistical inference.
Topic 12: Multiple Linear Regression
Strip-Plot Designs Sometimes called split-block design
GENERAL LINEAR MODELS: Estimation algorithms
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
Sub - Sampling It may be necessary or convenient to measure a treatment response on subsamples of a plot –several soil cores within a plot –duplicate laboratory.
Chapter 5 Introduction to Factorial Designs
Different chi-squares Ulf H. Olsson Professor of Statistics.
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.
Stat Today: Transformation of the response; Latin-squares.
Chapter 3 Analysis of Variance
Every achievement originates from the seed of determination. 1Random Effect.
Different chi-squares Ulf H. Olsson Professor of Statistics.
Analysis of Variance Chapter 3Design & Analysis of Experiments 7E 2009 Montgomery 1.
13-1 Designing Engineering Experiments Every experiment involves a sequence of activities: Conjecture – the original hypothesis that motivates the.
Unsorted Treatments Random Numbers Sorted Sorted Experimental Treatments Random Units Numbers.
The General LISREL MODEL and Non-normality Ulf H. Olsson Professor of Statistics.
Statistics 350 Lecture 17. Today Last Day: Introduction to Multiple Linear Regression Model Today: More Chapter 6.
Outline Single-factor ANOVA Two-factor ANOVA Three-factor ANOVA
13 Design and Analysis of Single-Factor Experiments:
Så används statistiska metoder i jordbruksförsök Svenska statistikfrämjandets vårkonferens den 23 mars 2012 i Alnarp Johannes Forkman, Fältforsk, SLU.
1 14 Design of Experiments with Several Factors 14-1 Introduction 14-2 Factorial Experiments 14-3 Two-Factor Factorial Experiments Statistical analysis.
1 Advances in Statistics Or, what you might find if you picked up a current issue of a Biological Journal.
5-1 Introduction 5-2 Inference on the Means of Two Populations, Variances Known Assumptions.
Fixed vs. Random Effects
ITK-226 Statistika & Rancangan Percobaan Dicky Dermawan
Covariance structures in longitudinal analysis Which one to choose?
Chapter 12 Multiple Linear Regression Doing it with more variables! More is better. Chapter 12A.
1 Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture 6 Solving Normal Equations and Estimating Estimable Model Parameters.
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
1 Chapter 13 Analysis of Variance. 2 Chapter Outline  An introduction to experimental design and analysis of variance  Analysis of Variance and the.
Regression. Population Covariance and Correlation.
Repeated Measurements Analysis. Repeated Measures Analysis of Variance Situations in which biologists would make repeated measurements on same individual.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 10-1 Chapter 10 Analysis of Variance Statistics for Managers Using Microsoft.
Regression Analysis Week 8 DIAGNOSTIC AND REMEDIAL MEASURES Residuals The main purpose examining residuals Diagnostic for Residuals Test involving residuals.
Review of Building Multiple Regression Models Generalization of univariate linear regression models. One unit of data with a value of dependent variable.
BUSI 6480 Lecture 8 Repeated Measures.
1 Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture 8 Analysis of Variance.
PSYC 3030 Review Session April 19, Housekeeping Exam: –April 26, 2004 (Monday) –RN 203 –Use pencil, bring calculator & eraser –Make use of your.
Single-Factor Studies KNNL – Chapter 16. Single-Factor Models Independent Variable can be qualitative or quantitative If Quantitative, we typically assume.
Chapter 22: Building Multiple Regression Models Generalization of univariate linear regression models. One unit of data with a value of dependent variable.
Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture 18 Random Effects.
Ch14: Linear Least Squares 14.1: INTRO: Fitting a pth-order polynomial will require finding (p+1) coefficients from the data. Thus, a straight line (p=1)
Simulation Study for Longitudinal Data with Nonignorable Missing Data Rong Liu, PhD Candidate Dr. Ramakrishnan, Advisor Department of Biostatistics Virginia.
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 11: Models Marshall University Genomics Core Facility.
IE241: Introduction to Design of Experiments. Last term we talked about testing the difference between two independent means. For means from a normal.
KNN Ch. 3 Diagnostics and Remedial Measures Applied Regression Analysis BUSI 6220.
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 Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture 9 Review.
Experimental Statistics - week 9
ANOVA Overview of Major Designs. Between or Within Subjects Between-subjects (completely randomized) designs –Subjects are nested within treatment conditions.
G Lecture 71 Revisiting Hierarchical Mixed Models A General Version of the Model Variance/Covariances of Two Kinds of Random Effects Parameter Estimation.
Summary of the Statistics used in Multiple Regression.
SUMMARY EQT 271 MADAM SITI AISYAH ZAKARIA SEMESTER /2015.
1 Experimental Statistics - week 8 Chapter 17: Mixed Models Chapter 18: Repeated Measures.
Repeated Measures Designs
Maximising the Value of Time Series Data:
Linear Mixed Models in JMP Pro
12 Inferential Analysis.
Chapter 5 Introduction to Factorial Designs
CHAPTER 29: Multiple Regression*
Randomized Complete Block and Repeated Measures (Each Subject Receives Each Treatment) Designs KNNL – Chapters 21,
12 Inferential Analysis.
OVERVIEW OF LINEAR MODELS
Fixed, Random and Mixed effects
ENM 310 Design of Experiments and Regression Analysis Chapter 3
Chapter 10 – Part II Analysis of Variance
STATISTICS INFORMED DECISIONS USING DATA
Presentation transcript:

1 Introduction to mixed models Ulf Olsson Unit of Applied Statistics and Mathematics

2 1. Introduction

3 2. General linear models (GLM) But... I'm not using any model. I'm only doing a few t tests.

4 GLM (cont.) Data: Response variable y for n ”individuals” Some type of design (+ possibly covariates) Linear model: y = f(design, covariates) + e y = XB+e

5 GLM (cont.) Examples of GLM: (Multiple) linear regression Analysis of Variance (ANOVA, including t test) Analysis of covariance (ANCOVA)

6 GLM (cont.) Parameters are estimated using either the Least squares, or Maximum Likelihood methods Possible to test statistical hypotheses, for example to test if different treatments give the same mean values Assumption: The residuals e i are independent, normally distributed and have constant variance.

7 GLM (cont): some definitions Factor: e.g. treatments, or properties such as sex –Levels Example : Facor: type of fertilizer Levels: Low Medium High level of N Experimental unit: The smallest unit that is given an individual treatment Replication: To repeat the same treatments on new experimental units

Experimetal unit 8 PupilsClass ChickenBox PlantsBench TreesPlot

9 3. “Mixed models”: Fixed and random factors Fixed factor: those who planned the experiment decided which levels to use Random factor: The levels are (or may be regarded as) a sample from a population of levels

10 Fixed and random factors Example: 40 forest stands. In each stand, one plot fertilized with A and one with B. Response variable: e.g. diameter of 5 trees on each plot Fixed factor: fertilizer, 2 levels (A and B) Experimental unit: the plot (NOT the tree!) Replication on 40 stands ”Stand” may be regarded as a random factor

11 Mixed models (cont.) Examples of random factors ”Block” in some designs ”Individual”(when several measurements are made on each individual) ”School class” (in experiments with teaching methods: then exp. unit is the class) …i.e. in situations when many measurements are made on the same experimental unit.

12 Mixed models (cont.) Mixed models are models that include both fixed and random factors. Programs for mixed models can also analyze models with only fixed, or only random, factors.

13 Mixed models: formally y = XB + Zu + e y is a vector of responses XB is the fixed part of the model X: design matrix B: parameter matrix Zu is the random part of the model e is a vector of residuals y = f(fixed part) + g(random part) + e

14 Parameters to estimate Fixed effects: the parameters in B Ramdom effects: –the variances and covariances of the random effects in u: Var(u)=G ”G-side random effects” –The variances and covariances of the residual effects: Var(e)=R ”R-side random effects”

15 To formulate a mixed model you might Decide the design matrix X for fixed effects Decide the design matrix Z for random effefcts In some types of models: Decide the structure of the covariance matrices G or, more commonly, R.

16 Example 1 Two-factor model with one random factor Treatments: two mosquito repellants A 1 and A 2 (Schwartz, 2005) 24 volonteeers divided into three groups 4 in each group apply A 1, 4 apply A 2 Each group visits one of three different areas y=number of bites after 2 hours

17 Ex 1: data

18 Ex 1: Model y ijk =  +  i +b j +ab ij +e ijk Where  is a general mean value,  i is the effect of brand i b j is the random effect of site j ab ij is the interaction between factors a and b e ijk is a random residual b j ~ N(o,  2 b ) e ijk ~ N(o,  2 e )

19 Ex 1: Program

20 Ex 1, results

21 Ex 1, results

22 Example 2: Subsampling Two treatments Three experimental units per treatment Two measurements on each experimental unit

23 Ex 2 An example of this type: 3 different fertilizers 4 plots with each fertilizer 2 mangold plants harvested from each plot y = iron content

24 Ex 2: data

25 Ex 2: model y ij =  +  i + b ij + e ijk  i Fixed effect of treatment i b ij Random effect of plot j within treatment i e ijk Random residual Note: Fixed effects – Greek letters Random effecvts – Latin letters

26 Ex 2: results

27 Example 3: ”Split-plot models” Models with several error terms y=The dry weight yield of grass Cultivar, levels A and B. Bacterial inoculation, levels, C, L, D Four replications in blocks.

28 Ex 3: design

29 Ex 3 Block and Block*cult used as random factors. Results for random factors:

30 Ex 3 Results for fixed factiors

31 Example 4: repeated measures 4 treatments 9 dogs per treatment Each dog measured at several time points

32 Ex 4: data structure treat dog t y

33 Ex 4: plot

Ex 4: program 34

35 Ex 4, results

Covariance structures for repeated-measurses data Model: y = XB + Zu + e The residuals e (”R-side random effects”) are correlateded over time, correlation matrix R. If R is left free (unstructured) this gives tx(t-1)/2 parameters to estimate (t=# of time points). If n is small and t is large, we might run into peoblems (non-vonvergence, negative definite Hessian matrix). 36

Covariance structure One solution: Apply some structure on R to reduce the number of parameters. 37

Covariance structure 38

Analysis strategy Baseline model: Time as a ”class” variable MODEL treatment time treatment*time; ”Repeated” part: First try UN. Simplify if needed: AR(1) for equidistant time points, else SP(POW) CS is only a last resort! To simplify the fixed part: Polynomials in time can be used. Or other known functions. 39

Other tricks Comparisons between models: Akaike’s Information Criterion (AIC) Denominator degrees of freedom for tests: Use the method by Kenward and Roger (1997) Normal distribution? Make diagnostic plots! Transformations? Robust (”sandwich”) estimators can be used -or Generalized Linear Mixed Models… 40

41 Not covered… Models with spatial variation –Lecture by Johannes Forkman Models with non-normal responses –(Generalized Linear Mixed Models) –Jan-Eric’s talk; Computer session tromorrow …and much more

42 Summary

43 ”All models are wrong… …but some are useful.” (G. E. P. Box)

References Fitzmaurice, G. M., Laird, N. M. and Ware, J. H. (2004): Applied longitudinal analysis. New York, Wiley Littell, R., Milliken, G., Stroup, W. Wolfinger, R. and and Schabenberger O. (2006): SAS for mixed models, second ed. Cary, N. C., SAS Institute Inc. (R solutions to this can be found on the net) Ulf Olsson: Generalized linear models: an applied approach. Lund, Student­litteratur, 2002 Ulf Olsson (2011):Statistics for Life Science 1. Lund, Studentlitteratur Ulf Olsson (2011):Statistics for Life Science 2. Lund, Studentlitteratur 44