Notating the Multilevel Longitudinal Model. Multilevel Modeling of Longitudinal Data. Notating (cont.) Notating (cont.)



Similar documents
Introduction to Hierarchical Linear Modeling with R

Statistical Models in R

E(y i ) = x T i β. yield of the refined product as a percentage of crude specific gravity vapour pressure ASTM 10% point ASTM end point in degrees F

SAS Syntax and Output for Data Manipulation:

Introducing the Multilevel Model for Change

VI. Introduction to Logistic Regression

Milk Data Analysis. 1. Objective Introduction to SAS PROC MIXED Analyzing protein milk data using STATA Refit protein milk data using PROC MIXED

DEPARTMENT OF PSYCHOLOGY UNIVERSITY OF LANCASTER MSC IN PSYCHOLOGICAL RESEARCH METHODS ANALYSING AND INTERPRETING DATA 2 PART 1 WEEK 9

A Handbook of Statistical Analyses Using R. Brian S. Everitt and Torsten Hothorn

The Latent Variable Growth Model In Practice. Individual Development Over Time

Basic Statistics and Data Analysis for Health Researchers from Foreign Countries

This can dilute the significance of a departure from the null hypothesis. We can focus the test on departures of a particular form.

Longitudinal Data Analyses Using Linear Mixed Models in SPSS: Concepts, Procedures and Illustrations

I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN

Family economics data: total family income, expenditures, debt status for 50 families in two cohorts (A and B), annual records from

Statistical Models in R

data visualization and regression

Introduction to Longitudinal Data Analysis

Paired Comparison Models. Paired Comparison Preference Models. The prefmod Package: Part I Some Examples. Paired Comparisons.

Lecture 5 : The Poisson Distribution

Electronic Thesis and Dissertations UCLA


Simple Linear Regression Inference

Chapter 7: Simple linear regression Learning Objectives

The 3-Level HLM Model

SPSS Guide: Regression Analysis

Lab 13: Logistic Regression

Overview Classes Logistic regression (5) 19-3 Building and applying logistic regression (6) 26-3 Generalizations of logistic regression (7)

Package smoothhr. November 9, 2015

# load in the files containing the methyaltion data and the source # code containing the SSRPMM functions

MIXED MODEL ANALYSIS USING R

# For usage of the functions, it is necessary to install the "survival" and the "penalized" package.

Multivariate Logistic Regression

Illustration (and the use of HLM)

Chapter 4 Models for Longitudinal Data

Linda Staub & Alexandros Gekenidis

Multilevel Modeling in R, Using the nlme Package

1. What is the critical value for this 95% confidence interval? CV = z.025 = invnorm(0.025) = 1.96

" Y. Notation and Equations for Regression Lecture 11/4. Notation:

Lecture 14: GLM Estimation and Logistic Regression

Analyzing Intervention Effects: Multilevel & Other Approaches. Simplest Intervention Design. Better Design: Have Pretest

Lecture 15: mixed-effects logistic regression

Mixed-effects regression and eye-tracking data

An Introduction to Modeling Longitudinal Data

Longitudinal Meta-analysis

Multilevel Models for Longitudinal Data. Fiona Steele

HYPOTHESIS TESTING: POWER OF THE TEST

Class 19: Two Way Tables, Conditional Distributions, Chi-Square (Text: Sections 2.5; 9.1)

ECON 142 SKETCH OF SOLUTIONS FOR APPLIED EXERCISE #2

Regression and Programming in R. Anja Bråthen Kristoffersen Biomedical Research Group

Psychology 405: Psychometric Theory Homework on Factor analysis and structural equation modeling

Multiple Linear Regression

Indices of Model Fit STRUCTURAL EQUATION MODELING 2013

Interaction between quantitative predictors

Using splines in regression

Basic Statistical and Modeling Procedures Using SAS

Exploratory Data Analysis

Random effects and nested models with SAS

12.5: CHI-SQUARE GOODNESS OF FIT TESTS

>

Outline. Topic 4 - Analysis of Variance Approach to Regression. Partitioning Sums of Squares. Total Sum of Squares. Partitioning sums of squares

Week 5: Multiple Linear Regression

INTERPRETING THE ONE-WAY ANALYSIS OF VARIANCE (ANOVA)

Module 5: Introduction to Multilevel Modelling. R Practical. Introduction to the Scottish Youth Cohort Trends Dataset. Contents

Module 5: Introduction to Multilevel Modelling SPSS Practicals Chris Charlton 1 Centre for Multilevel Modelling

R 2 -type Curves for Dynamic Predictions from Joint Longitudinal-Survival Models

1 Basic ANOVA concepts

The Basic Two-Level Regression Model

A LONGITUDINAL AND SURVIVAL MODEL WITH HEALTH CARE USAGE FOR INSURED ELDERLY. Workshop

5. Multiple regression

Statistiek II. John Nerbonne. October 1, Dept of Information Science

Ridge Regression. Patrick Breheny. September 1. Ridge regression Selection of λ Ridge regression in R/SAS

1 Simple Linear Regression I Least Squares Estimation

MATH 10: Elementary Statistics and Probability Chapter 5: Continuous Random Variables

Applied Statistics. J. Blanchet and J. Wadsworth. Institute of Mathematics, Analysis, and Applications EPF Lausanne

Viewing Ecological data using R graphics

Normal Distribution. Definition A continuous random variable has a normal distribution if its probability density. f ( y ) = 1.

Analysis of ordinal data with cumulative link models estimation with the R-package ordinal

Parametric and non-parametric statistical methods for the life sciences - Session I

HLM software has been one of the leading statistical packages for hierarchical

Part 2: Analysis of Relationship Between Two Variables

ANOVA. February 12, 2015

Willett & Singer, 2003 October 13, 2003

Highlights the connections between different class of widely used models in psychological and biomedical studies. Multiple Regression

Chapter 2 Models With Multiple Random-effects Terms

Multiple Regression. Page 24

Final Exam Practice Problem Answers

Goodness of Fit Tests for Categorical Data: Comparing Stata, R and SAS

Time Series Analysis

Introduction. Survival Analysis. Censoring. Plan of Talk

Logistic regression (with R)

Time Series Analysis with R - Part I. Walter Zucchini, Oleg Nenadić

1. The parameters to be estimated in the simple linear regression model Y=α+βx+ε ε~n(0,σ) are: a) α, β, σ b) α, β, ε c) a, b, s d) ε, 0, σ

Tests for Two Survival Curves Using Cox s Proportional Hazards Model

Comparing Nested Models

Probability Calculator

11. Analysis of Case-control Studies Logistic Regression

GLM with a Gamma-distributed Dependent Variable

Package lmertest. July 16, 2015

Using R for Linear Regression

Transcription:

Notating the Multilevel Modeling of Longitudinal Data Recall the typical -level model Y ij = γ 00 + (γ 0 + u j )X ij + u 0j + e ij Dr. J. Kyle Roberts Southern Methodist University Simmons School of Education and Human Development Department of Teaching and Learning For the multilevel repeated measures model, we have measurement occasions nested inside individuals. Y ti = β 00 + (β 0 + u j )T ti + u 0i + e ti where T ti is a variable designating the time at which Y ti is measured Notating (cont.) Notating (cont.) From before, we can take the full mixed model. Y ti = β 00 + (β 0 + u j )T ti + u 0i + e ti and break it into levels such that the measurement level is Y ti = π 0i + π i T ti + e ti When we add variables at the measurement level into these models, they are referred to as time-varying covariates. Supposing that Y ti is student GPA at time t. A time-varying covariate could be the number of hours of coursework the student was taking at time t. This would be modeled as: and the student level is: Y ti = β 00 + (β 0 + u j )T ti + β 0 X ti + u 0i + e ti π 0i = β 00 + u 0i π i = β 0 + u i Variables at the student level would be referred to as time-invariant covariates, such as gender. These would be modeled as: This model is also referred to as the null model in the multilevel repeated measures as it is the reference model from which we will test all future models. Y ti = β 00 + (β 0 + u j )T ti + β 0 X ti + β 0 Z i + u 0i + e ti

Data Generation > par(mfrow = c(, )) > boxplot(reading ~, data = read.data, xlab = "Weeks of Instr + ylab = "Reading Score") > boxplot(reading ~ id, data = read.data, xlab = "Student ID", + ylab = "Reading Score") > set.seed(00) > read.data <- data.frame(expand.grid( = 0:, + id = :0), treatment = rep(c("control", "treat"), + each = 0), reading = c(sort(rnorm(0,, + 0)), sort(rnorm(0,, 0)), sort(rnorm(0, +, 0)), sort(rnorm(0,, 0)), sort(rnorm(0, + 0, 0)), sort(rnorm(0,, )), sort(rnorm(0, +, )), sort(rnorm(0,, )), sort(rnorm(0, +, )), sort(rnorm(0,, )))) > read.data <- factor(read.data) Reading Score Reading Score Weeks of Instruction Student ID > print(xyplot(reading ~ id, data = read.data, Repeated Measures ANOVA reading 0 > summary(aov(reading ~ factor() + Error(id), + data = read.data)) Error: id Residuals 0 Error: Within factor() 0..0.e-0 Residuals.

Add as a Between Subjects Factor The Multilevel Time Series > (m0 <- lmer(reading ~ + ( id), read.data)) > summary(aov(reading ~ factor() * treatment + + Error(id), data = read.data)) Error: id treatment 0. 0. Residuals 0 Error: Within factor() 0..0.e- factor():treatment.0..0e-0 Residuals 0. Formula: reading ~ + ( id) 0 0-0 0 00 id (Intercept).... -0. Residual.. (Intercept).0.0 0.... (Intr) -0. The Multilevel Time Series (cont.) Adding a treatment effect > (m <- lmer(reading ~ + treatment + ( + id), read.data)) > coef(m0) (Intercept).0000. 0..0.00.0.0.0.00.0.0. 0. 0. 0.0... 0.. Formula: reading ~ + treatment + ( id) 00 0-0 id (Intercept). 0.0.. -0. Residual.. (Intercept) 0..0.0... treatmenttreat -..0-0. (Intr)

Adding a treatment effect (cont.) Adding an interaction effect > (m <- lmer(reading ~ * treatment + ( + id), read.data)) > coef(m) (Intercept) treatmenttreat..0 -. 0.0. -...0 -...00 -...0 -. 0.0.0 -.. 0.0 -. 0..0 -. 0..0 -. 0..0 -. Formula: reading ~ * treatment + ( id) 0-0. 00 id (Intercept) 0.... -0.0 Residual.0. (Intercept).0. 0..0.. treatmenttreat -.. -.00 :treatmenttreat.0.00. Adding an interaction effect (cont.) > coef(m) (Intr) trtmnt -0. treatmnttrt -0.0 0. wks:trtmntt 0. -0.0-0. Comparing Model Fit (Intercept) treatmenttreat.0.0 -..0. -... -..0. -... -. 0.0. -.. -. -..00.00 -..0 -. -. 0 0.. -. :treatmenttreat.0.0.0.0.0.0.0.0 > anova(m0, m, m) Models: m0: reading ~ + ( id) m: reading ~ + treatment + ( id) m: reading ~ * treatment + ( id) Df AIC BIC loglik Chisq Chi Df Pr(>Chisq) m0 0. 0. -0. m 0.0 0. -0. 0.0 0. m 0. 0. -0.. 0.00

Interaction Plot > interaction.plot(read.data$, read.data$treatment, + fitted(m), xlab = "Weeks", ylab = "Reading", + lwd =, lty =, col = c("black", "grey")) Growth Trajectories for m0 > print(xyplot(fitted(m0) ~ id, read.data, Reading 0 0 0 read.data$treatment treat control fitted(m0) 0 Weeks Growth Trajectories for m > print(xyplot(fitted(m) ~ id, read.data, fitted(m) 0