04LMM_data - PubH8452 Longitudinal Data Analysis - Fall...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
PubH8452 Longitudinal Data Analysis - Fall 2011 Linear Mixed Model: Case Studies Linear Mixed Model: Case Studies General Guidelines Unlike simple linear regression models, for correlated data we need pay attention to both the mean model and the variance model. When the mean model is of primary interest, it may be sufficient to use a simple variance model and use empirical variances to achieve valid inference. Still it might be worthwhile to find an appropriate variance model to improve efficiency. When the variance model is also of interest, care must be taken to model it correctly. In addition, the mean model is also critical. When the wrong mean model is used, the variance estimation will not even be consistent. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
PubH8452 Longitudinal Data Analysis - Fall 2011 Linear Mixed Model: Case Studies Typically the model building process involves the following steps: 1. Fit an over-elaborated (“saturated”) mean model with simple covariance structure (e.g., working independence). 2. Use the residuals to explore the variance structure and select a covariance model. 3. Refit the over-elaborated model with the covariance model to see if the goodness-of-fit is adequate. 4. If yes, then try to simplify the mean model. Otherwise repeat the modeling process. Keep in mind that modeling is the means not the end. Goodness-of-fit is not the ultimate criterion for selecting models. Simplicity and interpretability are just as important, if not more so. Address the scientific question of interest. 2
Background image of page 2
PubH8452 Longitudinal Data Analysis - Fall 2011 Linear Mixed Model: Case Studies Fitting Linear Mixed Effects Model Grouped Data Object in nlme The “tracking” data: library(nlme) # groupedData library(lattice) # histogram > tracking <- read.table ("tracking.dat", header = TRUE) > tracking[1:4,] Sex Age Shape Trial1 Trial2 Trial3 Trial4 1 M 31 Box 2.68 4.14 7.22 8.00 2 M 30 Box 7.09 8.55 8.79 9.68 3 M 30 Box 6.05 6.25 7.04 7.80 4 M 27 Box 4.35 6.50 5.17 6.50 > tracklong <- reshape (tracking, direction = "long", + varying = 4:7, times = 1:4, + split = list (regexp = "l", include = TRUE)) > tracklong <- tracklong[order (tracklong$id, tracklong$time),] > tracklong[1:4,] Sex Age Shape time Trial id 1.1 M 31 Box 1 2.68 1 1.2 M 31 Box 2 4.14 1 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
PubH8452 Longitudinal Data Analysis - Fall 2011 Linear Mixed Model: Case Studies 1.3 M 31 Box 3 7.22 1 1.4 M 31 Box 4 8.00 1 > tracklong <- groupedData (Trial ~ time | id, data = tracklong, + outer = ~ Sex * Shape) > gsummary (tracklong) Sex Age Shape time Trial id 36 F 6 Box 2.5 0.1475 36 41 F 5 Box 2.5 0.3375 41 42 F 45 Box 2.5 0.4075 42 13 F 7 Box 2.5 0.4550 13 ...... > gsummary (tracklong, inv = TRUE, omit = TRUE) Sex Age Shape 36 F 6 Box 41 F 5 Box 42 F 45 Box 13 F 7 Box ...... > gapply (tracklong, "Trial", sd) 36.Trial 41.Trial 42.Trial 13.Trial 0.09569918 0.17192537 0.16276261 0.29285947 4
Background image of page 4
PubH8452 Longitudinal Data Analysis - Fall 2011 Linear Mixed Model: Case Studies > plot (tracklong, outer = TRUE, aspect = "fill", + xlab = "Trial", ylab = "Contact Time (sec)", + auto.key = FALSE, key = NULL) Trial Contact Time (sec) 0 2 4 6 8 10 12 1.0 1.5 2.0 2.5 3.0 3.5 4.0 F Box M Box F Circle 1.0 1.5 2.0 2.5 3.0 3.5 4.0 0 2 4 6 8 10 12 M Circle Figure 1: Tracking data 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
PubH8452 Longitudinal Data Analysis - Fall 2011 Linear Mixed Model: Case Studies > track.sum <- gsummary (tracklong) > histogram (~ Trial | Sex * Shape, data = track.sum, xlab="Seconds")
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/21/2011 for the course PUBH 8452 taught by Professor Xianghualuo during the Fall '11 term at Minnesota.

Page1 / 59

04LMM_data - PubH8452 Longitudinal Data Analysis - Fall...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online