overview of this module course 02429 analysis of
play

Overview of this module Course 02429 Analysis of correlated data: - PowerPoint PPT Presentation

Overview of this module Overview of this module Course 02429 Analysis of correlated data: Mixed Linear Models Different view on the random effects approach 1 Module 12: Repeated measures II, advanced methods Example: Activity of rats


  1. Overview of this module Overview of this module Course 02429 Analysis of correlated data: Mixed Linear Models Different view on the random effects approach 1 Module 12: Repeated measures II, advanced methods Example: Activity of rats Gaussian model of spatial correlation 2 Example: Activity of rats Per Bruun Brockhoff Other spatial correlation structures 3 DTU Compute Building 324 - room 220 Diagram of analysis 4 Technical University of Denmark 2800 Lyngby – Denmark The semi-variogram 5 e-mail: perbb@dtu.dk Analysing the time structure by polynomial regression 6 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 1 / 24 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 2 / 24 Aim of this module Aim of this module Aim of this module Remember the rats data set? Summary of experiment: 3 treatments: 1, 2, 3 (concentration) 10 cages per treatment 10 contiguous months The response is activity ( log( count ) of intersections of light beam Extend the toolbox for dealing with repeated measures during 57 hours) Introduce models where the covariance structure is directly specified 10.5 Improve our ability to handle long series 10.0 See how to specify these models in R log(count) 9.5 9.0 8.5 1 2 3 4 5 6 7 8 9 10 Month Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 3 / 24 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 4 / 24

  2. Different view on the random effects approach Different view on the random effects approach Example: Activity of rats Different view on the random effects approach Activity of rats analyzed via compound symmetry model Any mixed model can be expressed as: The model is the same as the random effects model, but specified y ∼ N ( X β, ZGZ ′ + R ) , directly lnc ∼ N ( µ, V ) , where The total covariance of all observations are described by µ i = µ + α ( treatm i ) + β ( month i ) + γ ( treatm i , month i ) , and V = ZGZ ′ + R  0 , if cage i 1 � = cage i 2 and i 1 � = i 2  σ 2 V i 1 ,i 2 = , if cage i 1 = cage i 2 and i 1 � = i 2 The ZGZ ′ part is specified through the random effects of the model d σ 2 d + σ 2 , if i 1 = i 2  The R part has so far been σ 2 I , but in this module we will put some Implemented in R traditionally by a random effect: structure into R lme(lnc ~ month + treatm + month:treatm, For instance the structure known from the random effects model random = ~1 | cage, data = rats)  0 , if individual i 1 � = individual i 2 and i 1 � = i 2  OR directly into the R-matrix: σ 2 cov ( y i 1 , y i 2 ) = , if individual i 1 = individual i 2 and i 1 � = i 2 individual σ 2 individual + σ 2 gls(lnc~month+treatm+month:treatm, , if i 1 = i 2  correlation=corCompSymm(form=~1|cage),data=rats) This structure is known as compound symmetry Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 6 / 24 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 7 / 24 Gaussian model of spatial correlation Gaussian model of spatial correlation Example: Activity of rats Gaussian model of spatial correlation Rats data via spatial Gaussian correlation model Covariance structures depending on “how far” observations are apart are known as spatial The entire model is: The following covariance structure has been proposed for repeated measurements lnc ∼ N ( µ, V ) , where  0 , if individual i 1 � = individual i 2 and i 1 � = i 2 = µ + α ( treatm i ) + β ( month i ) + γ ( treatm i , month i ) , and µ i   � � − ( t i 1 − t i 2 ) 2   ν 2 + τ 2 exp 0 , if cage i 1 � = cage i 2 and i 1 � = i 2 V i 1 ,i 2 = , if individual i 1 = individual i 2 and i 1 � = i 2  ρ 2  � − ( month i 1 − month i 2 ) 2 �  ν 2 + τ 2 exp  ν 2 + τ 2 + σ 2 = , if cage i 1 = cage i 2 and i 1 � = i 2 V i 1 ,i 2  , if i 1 = i 2  ρ 2  ν 2 + τ 2 + σ 2  , if i 1 = i 2  ν 2 + τ 2 This model is implemented by: Covariance lme(lnc~month+treatm+month:treatm, ν 2 + 0.5 τ 2 random=~1|cage, correlation=corGaus(form=~as.numeric(month)|cage,nugget=T), ν 2 data=rats) 0 0.83 ρ 0 Distance t i 1 − t i 2 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 9 / 24 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 10 / 24

  3. Gaussian model of spatial correlation Example: Activity of rats Gaussian model of spatial correlation Example: Activity of rats Reduction from spatial Gaussian to random effects? The relevant part of the R output is: Random effects: The spatial Gaussian model ( A ) is an extension of the random effects Formula: ~1 | cage model ( B ) (Intercept) Residual √ σ 2 + ˆ τ 2 ) StdDev: 0.1404056 (= ˆ ν ) 0.2171559 (= ˆ Use the restricted/residual likelihood ratio test Correlation Structure: Gaussian spatial correlation Formula: ~as.numeric(month) | cage G A → B = 2 ℓ ( B ) re − 2 ℓ ( A ) re , where G A → B ∼ χ 2 2 Parameter estimate(s): range nugget For the rats data we get: σ 2 + ˆ ρ 2 ) 0.2186744 σ 2 / (ˆ τ 2 )) 2.3863954 (= ˆ (= ˆ Model 2 ℓ re G–value P–value df Number of Observations: 300 (A) Spatial Gaussian -105.3 G A → B = 113 . 9 2 P A → B < 0 . 0001 Number of Groups: 30 (B) Random effects 8.6 Notice the R parametrization of the variance parameters The spatial Gaussian structure is clearly a better description of the covariance structure in the rats data set Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 11 / 24 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 12 / 24 Other spatial correlation structures Diagram of analysis Other spatial correlation structures Diagram of analysis R has several build–in correlation structures. A few examples are: Write in R Name Correlation term Identify "individuals" − ( t i 1 − t i 2 ) 2 τ 2 exp { Select covariance structure from Gaussian } corGaus ρ 2 −| t i 1 − t i 2 | τ 2 exp { knowledge about the experiment exponential } corExp ρ Select fixed effects guided by information criteria τ 2 ρ | i 1 − i 2 | autoregressive(1) corAR1 τ 2 unstructured corSymm Covariance parameters are tested by i 1 ,i 2 Unfortunately is can be very difficult to choose — especially for likelihood ratio test Select covariance structure “short” individual series The green arrow is often omitted by Change Change model model General advice: the argument that a non–significant Test covariance parameters Keep it simple: Numerical problems often occur with (too) complicated simplification of the mean structure structures should not change the covariance Graphical methods: Especially for “long” series the (semi)–variogram is Test fixed effects structure much useful Information criteria: AIC or BIC = “ 2 ℓ + penalty(#par)” can be used Interpret results as guideline Try to cross–validate your main conclusion(s) by one of the “simple” methods Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 14 / 24 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 16 / 24

  4. The semi-variogram The semi-variogram The semi-variogram The semi-variogram print(plot(Variogram(model2, form = ˜ as.numeric(month)|cage, data = rats))) ● Plotting of the empirical covariation (of residuals) versus "time" ● Plot of σ 2 + γ ( u ) , where ● γ ( u ) = τ 2 � � 1 − λ ( u ) 1.0 λ ( u ) = exp {− u 2 /ρ 2 } Semivariogram ● ● 4 ● ν 2 3 Covariance 0.5 ● 2 ● τ 2 1 0.0 σ 2 0 2 4 6 8 Distance 0 1 2 3 4 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 18 / 24 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 19 / 24 Time difference The semi-variogram The semi-variogram The semi-variogram The semi-variogram model3 <- lme(lnc month + treatm + month:treatm, random = 1 | model4 <- lme(lnc month + treatm + month:treatm, random = 1 | cage, correlation = corExp(form = ˜ as.numeric(month) | cage, correlation = corAR1(form = as.numeric(month) | cage, nugget = T), data = rats) cage), data = rats) print(plot(Variogram(model3, form = ˜ as.numeric(month)|cage, print(plot(Variogram(model4, form = ˜ as.numeric(month)|cage, data = rats))) data = rats))) 1.0 ● ● 1.0 ● ● ● 0.8 ● 0.8 ● Semivariogram ● Semivariogram ● 0.6 ● ● 0.6 ● ● 0.4 0.4 ● ● ● ● 0.2 0.2 0.0 2 4 6 8 2 4 6 8 Distance Distance Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 20 / 24 Per Bruun Brockhoff (perbb@dtu.dk) Mixed Linear Models, Module 12 Fall 2014 21 / 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend