Generalized Linear Mixed Modeling and PROC GLIMMIX Richard Charnigo Professor of Statistics and Biostatistics Director of Statistics and Psychometrics.

Slides:



Advertisements
Similar presentations
A Gentle Introduction to Linear Mixed Modeling and PROC MIXED
Advertisements

Continued Psy 524 Ainsworth
An Introduction to Group-Based Trajectory Modeling and PROC TRAJ Richard Charnigo Professor of Statistics and Biostatistics Director of Statistics and.
Brief introduction on Logistic Regression
1 Functions and Applications
1 12. Principles of Parameter Estimation The purpose of this lecture is to illustrate the usefulness of the various concepts introduced and studied in.
FTP Biostatistics II Model parameter estimations: Confronting models with measurements.
TRIM Workshop Arco van Strien Wildlife statistics Statistics Netherlands (CBS)
Correlation and regression Dr. Ghada Abo-Zaid
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 13 Nonlinear and Multiple Regression.
Chapter 8 Linear Regression © 2010 Pearson Education 1.
Regression With Categorical Variables. Overview Regression with Categorical Predictors Logistic Regression.
Some Terms Y =  o +  1 X Regression of Y on X Regress Y on X X called independent variable or predictor variable or covariate or factor Which factors.
LINEAR REGRESSION: Evaluating Regression Models Overview Assumptions for Linear Regression Evaluating a Regression Model.
MULTIPLE REGRESSION. OVERVIEW What Makes it Multiple? What Makes it Multiple? Additional Assumptions Additional Assumptions Methods of Entering Variables.
LINEAR REGRESSION: Evaluating Regression Models. Overview Assumptions for Linear Regression Evaluating a Regression Model.
The Simple Linear Regression Model: Specification and Estimation
Lecture 3: Chi-Sqaure, correlation and your dissertation proposal Non-parametric data: the Chi-Square test Statistical correlation and regression: parametric.
Longitudinal Experiments Larry V. Hedges Northwestern University Prepared for the IES Summer Research Training Institute July 28, 2010.
1 Simple Linear Regression Chapter Introduction In this chapter we examine the relationship among interval variables via a mathematical equation.
Notes on Logistic Regression STAT 4330/8330. Introduction Previously, you learned about odds ratios (OR’s). We now transition and begin discussion of.
An Introduction to Logistic Regression
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 15-1 Chapter 15 Multiple Regression Model Building Basic Business Statistics 11 th Edition.
6.4 Prediction -We have already seen how to make predictions about our dependent variable using our OLS estimates and values for our independent variables.
Sampling Theory Determining the distribution of Sample statistics.
Generalized Linear Models
Multiple Linear Regression A method for analyzing the effects of several predictor variables concurrently. - Simultaneously - Stepwise Minimizing the squared.
Copyright ©2011 Pearson Education 15-1 Chapter 15 Multiple Regression Model Building Statistics for Managers using Microsoft Excel 6 th Global Edition.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS & Updated by SPIROS VELIANITIS.
Inference for regression - Simple linear regression
Chapter 13: Inference in Regression
Biostatistics Case Studies 2005 Peter D. Christenson Biostatistician Session 4: Taking Risks and Playing the Odds: OR vs.
Lecture 8: Generalized Linear Models for Longitudinal Data.
Lecture 22 Dustin Lueker.  The sample mean of the difference scores is an estimator for the difference between the population means  We can now use.
Ch4 Describing Relationships Between Variables. Pressure.
Rasch trees: A new method for detecting differential item functioning in the Rasch model Carolin Strobl Julia Kopf Achim Zeileis.
VI. Evaluate Model Fit Basic questions that modelers must address are: How well does the model fit the data? Do changes to a model, such as reparameterization,
Multiple Regression The Basics. Multiple Regression (MR) Predicting one DV from a set of predictors, the DV should be interval/ratio or at least assumed.
Ch4 Describing Relationships Between Variables. Section 4.1: Fitting a Line by Least Squares Often we want to fit a straight line to data. For example.
Multilevel Linear Modeling aka HLM. The Design We have data at two different levels In this case, 7,185 students (Level 1) Nested within 160 Schools (Level.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 Linear Regression.
University of Warwick, Department of Sociology, 2014/15 SO 201: SSAASS (Surveys and Statistics) (Richard Lampard) Week 7 Logistic Regression I.
Linear vs. Logistic Regression Log has a slightly better ability to represent the data Dichotomous Prefer Don’t Prefer Linear vs. Logistic Regression.
HSRP 734: Advanced Statistical Methods July 17, 2008.
Lecture 8 Simple Linear Regression (cont.). Section Objectives: Statistical model for linear regression Data for simple linear regression Estimation.
April 4 Logistic Regression –Lee Chapter 9 –Cody and Smith 9:F.
2.4 Units of Measurement and Functional Form -Two important econometric issues are: 1) Changing measurement -When does scaling variables have an effect.
MGT-491 QUANTITATIVE ANALYSIS AND RESEARCH FOR MANAGEMENT OSMAN BIN SAIF Session 26.
Chapter 8: Simple Linear Regression Yang Zhenlin.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 8- 1.
Dr. Richard Charnigo Professor of Statistics and Biostatistics 08 and 11 January 2016.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc. Chap 15-1 Chapter 15 Multiple Regression Model Building Basic Business Statistics 10 th Edition.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 14-1 Chapter 14 Multiple Regression Model Building Statistics for Managers.
1 Statistics 262: Intermediate Biostatistics Regression Models for longitudinal data: Mixed Models.
Sampling Design and Analysis MTH 494 Lecture-21 Ossam Chohan Assistant Professor CIIT Abbottabad.
G Lecture 71 Revisiting Hierarchical Mixed Models A General Version of the Model Variance/Covariances of Two Kinds of Random Effects Parameter Estimation.
Roger B. Hammer Assistant Professor Department of Sociology Oregon State University Conducting Social Research Logistic Regression Categorical Data Analysis.
Dr. Richard Charnigo Professor of Statistics and Biostatistics 07 December 2015.
LOGISTIC REGRESSION. Purpose  Logistical regression is regularly used when there are only two categories of the dependent variable and there is a mixture.
Multiple Regression.
Chapter 15 Multiple Regression Model Building
The simple linear regression model and parameter estimation
BINARY LOGISTIC REGRESSION
Notes on Logistic Regression
Generalized Linear Models
Multiple Regression.
10701 / Machine Learning Today: - Cross validation,
A Gentle Introduction to Linear Mixed Modeling and PROC MIXED
STA 291 Summer 2008 Lecture 23 Dustin Lueker.
STA 291 Spring 2008 Lecture 23 Dustin Lueker.
Presentation transcript:

Generalized Linear Mixed Modeling and PROC GLIMMIX Richard Charnigo Professor of Statistics and Biostatistics Director of Statistics and Psychometrics Core, CDART

Objectives First ~80 minutes: 1. Be able to formulate a generalized linear mixed model for longitudinal data involving a categorical and a continuous covariate. 2. Understand how generalized linear mixed modeling differs from logistic regression and linear mixed modeling. Last ~40 minutes: 3. Be able to use PROC GLIMMIX to fit a generalized linear mixed model for longitudinal data involving a categorical and a continuous covariate.

Motivating example The Excel file at { contains a simulated data set: Five hundred college freshmen (“ID”) are asked to indicate whether they have consumed marijuana during the past three months (“MJ”). The students are also assessed on negative urgency; the results are expressed as Z scores (“NegUrg”). One and two years later (“Time”), most of the students supply updated information on marijuana consumption; however, some students drop out.

Motivating example Two possible “research questions” are: i.Is there an association between negative urgency and marijuana use at baseline ? ii.Does marijuana use tend to change over time and, if so, is that change predicted by negative urgency at baseline ? We can envisage more complicated and realistic scenarios ( e.g., with additional personality variables and/or interventions ), but this simple scenario will help us get a hold of generalized linear mixed modeling and PROC GLIMMIX.

Exploratory data analysis Before pursuing generalized linear mixed (or other statistical) modeling, we are well-advised to engage in exploratory data analysis. This can alert us to any gross mistakes in the data set, heretofore undetected, which may compromise our work. This can also suggest a structure for the generalized linear mixed model and help us to anticipate what the results should be.

Exploratory data analysis VariableLabelNMinimum Lower QuartileMedian Upper QuartileMaximumMeanStd DevSkewness Time NegUrg MJ In this example, no gross mistakes are apparent. Having Z scores between and seems reasonable for a sample of size 500. The minimum and maximum values of time and marijuana use are correct, given that the latter is being treated dichotomously.

Exploratory data analysis Table of MJ by negurgstratum MJ(MJ)negurgstratum Frequency Percent Row Pct Col Pct 012Total Total There is a clear association between negative urgency stratum and marijuana use during freshman year, with 8.7% of those low on negative urgency (bottom 25%) using marijuana versus 19.5% for average (middle 50%) and 37.5% for high (top 25%).

Exploratory data analysis Table of MJ by negurgstratum MJ(MJ)negurgstratum Frequency Percent Row Pct Col Pct 012Total Total A similar phenomenon is observed in sophomore year, but overall marijuana use has increased from 21.6% to 30.4%.

Exploratory data analysis Table of MJ by negurgstratum MJ(MJ)negurgstratum Frequency Percent Row Pct Col Pct 012Total Total By junior year, marijuana use has increased to 33.5%.

First generalized linear mixed model Let Y jk denote subject j’s marijuana use at time k. Because Y jk is dichotomous, we cannot employ a linear mixed model, which assumes a continuous (in fact, normally distributed) outcome. However, consider these three equations: logit{P(Y jk = 1)} = a 0 + a 1 k, if subject j is low logit{P(Y jk = 1)} = b 0 + b 1 k, if subject j is average logit{P(Y jk = 1)} = c 0 + c 1 k, if subject j is high on negative urgency, where logit{x} is defined as log( x / (1-x) ).

First generalized linear mixed model Three comments are in order: First, the generalized linear mixed model defined by the three equations can be expressed as a logistic regression model. Let X 1 and X 2 respectively be dummy variables for low and high negative urgency. Then we may write logit{P(Y jk = 1)} = b 0 + (a 0 – b 0 ) X 1j + (c 0 – b 0 ) X 2j + ( b 1 + (a 1 – b 1 ) X 1j + (c 1 – b 1 ) X 2j ) k. Indeed, just as linear regression is a special case of linear mixed modeling, logistic regression is a special case of generalized linear mixed modeling.

First generalized linear mixed model Second, we are in essence logistic-regressing marijuana use on time but allowing each subject to have one of three intercepts and one of three slopes, according to his/her negative urgency. Third, our research questions amount to asking whether a 0, b 0, c 0 differ from each other, whether a 1, b 1, c 1 differ from zero, and whether a 1, b 1, c 1 differ from each other.

First generalized linear mixed model Now let us examine the results from fitting the generalized linear mixed model using PROC GLIMMIX. We see that PROC GLIMMIX used all available observations ( 1350 ), including observations from the 100 subjects who dropped out early. Number of Observations Read1350 Number of Observations Used1350

First generalized linear mixed model The estimates of the intercepts a 0, b 0, c 0 are -2.48, -1.33, and The estimates of the slopes a 1, b 1, c 1 are 0.18, 0.38, and Exponentiating the latter gives us estimates of the factors by which the odds of marijuana use get multiplied each year, within each of the negative urgency strata. For example, exp(0.3143) = in the high stratum. Parameter Estimates EffectnegurgstratumEstimate Standard ErrorDFt ValuePr > |t| negurgstratum <.0001 negurgstratum <.0001 negurgstratum Time*negurgstratum Time*negurgstratum Time*negurgstratum

First generalized linear mixed model We can also use PROC GLIMMIX to estimate any linear combinations of a 0, b 0, c 0, a 1, b 1, c 1. For example, below are estimates of c 0 – a 0 ( high vs. low negative urgency freshmen ), ( c 0 + c 1 ) – ( a 0 + a 1 ) ( high vs. low negative urgency sophomores ), and ( c 0 + 2c 1 ) – ( a 0 + 2a 1 ) ( high vs. low negative urgency juniors ). Again, exponentiation will yield estimated odds ratios. Estimates LabelEstimateStandard ErrorDFt ValuePr > |t| High vs low freshman <.0001 High vs low sophomore <.0001 High vs low junior <.0001

Second generalized linear mixed model As noted earlier, our first generalized linear mixed model can be expressed as a logistic regression model. How, then, does generalized linear mixed modeling go beyond logistic regression ? The answer is that we may also allow each subject to have his/her own personal intercept and slope, not merely choose from among three intercepts and three slopes. This can capture correlations among repeated measurements on that subject. The personal intercept and slope may be related to negative urgency and to unmeasured factors. For simplicity in what follows, however, we will confine attention to a personal intercept.

Second generalized linear mixed model More specifically, we propose the following: logit{P(Y jk = 1)} = b 0 + (a 0 – b 0 ) X 1j + (c 0 – b 0 ) X 2j + P 1j + ( b 1 + (a 1 – b 1 ) X 1j + (c 1 – b 1 ) X 2j ) k. Above, P 1j is an unobserved zero-mean variable that adjusts the intercept for subject j. Thus, the interpretations of a 0, b 0, c 0 are subtly altered. They are now the average intercepts for subjects who are low, average, and high on negative urgency. Even so, our research questions are still addressed by estimating a 0, b 0, c 0, a 1, b 1, c 1.

Second generalized linear mixed model While we can “predict” P 1j from the data, in practice this is rarely done. However, its variance is routinely estimated. Covariance Parameter Estimates Cov ParmSubjectEstimateStandard Error UN(1,1)ID Solutions for Fixed Effects EffectnegurgstratumEstimate Standard ErrorDFt ValuePr > |t| negurgstratum <.0001 negurgstratum <.0001 negurgstratum Time*negurgstratum Time*negurgstratum Time*negurgstratum

Second generalized linear mixed model Some care is now required in interpreting odds ratio estimates. For example, exp(2.3808) = says that a freshman high on negative urgency is estimated to have times the odds of using marijuana versus a freshman low on negative urgency, controlling for whatever unmeasured factors contribute to the personal intercepts. Estimates LabelEstimate Standard ErrorDFt ValuePr > |t| High vs low freshman <.0001 High vs low sophomore <.0001 High vs low junior <.0001

Second generalized linear mixed model Which model is better: the first or second ? Conceptually, the second model is appealing because P 1j captures correlations among the repeated observations on subject j. Thus, we avoid the unrealistic assumption, present in logistic regression, that observations are independent. Empirically, we may examine a model selection criterion such as the BIC; a smaller value is better. Here are results for the first and second models. Fit Statistics -2 Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Fit Statistics -2 Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better)

Third generalized linear mixed model So far we have treated negative urgency as categorical, but this is not necessary and perhaps not optimal. Let us now consider the following: logit{P(Y jk = 1)} = ( d 0 + e 0 N j + P 1j ) + ( d 1 + e 1 N j ) k. Above, N j denotes the continuous negative urgency variable, while P 1j is, as before, an adjustment to the intercept.

Third generalized linear mixed model Since negative urgency was expressed as a Z score, d 0 is the average intercept and d 1 is the slope among those average on negative urgency. Likewise, d 0 + e 0 is the average intercept and d 1 + e 1 is the slope among those one standard deviation above average on negative urgency. And, d 0 – e 0 is the average intercept and d 1 – e 1 is the slope among those one standard deviation below average on negative urgency.

Third generalized linear mixed model We estimate the variance of P 1j as well as estimating d 0, e 0, d 1, e 1. Covariance Parameter Estimates Cov ParmSubjectEstimateStandard Error UN(1,1)ID Solutions for Fixed Effects EffectEstimateStandard ErrorDFt ValuePr > |t| Intercept <.0001 NegUrg <.0001 Time <.0001 NegUrg*Time

Third generalized linear mixed model In addition, we may estimate linear combinations of d 0, e 0, d 1, e 1. For example, 2e 0 compares freshmen one standard deviation above to freshmen one standard deviation below, 2e 0 + 2e 1 compares such sophomores, and 2e 0 + 4e 1 compares such juniors. Moreover, the BIC prefers this model over either of the first two. Estimates LabelEstimate Standard ErrorDFt ValuePr > |t| High vs low freshman <.0001 High vs low sophomore <.0001 High vs low junior <.0001 Fit Statistics -2 Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better)

What’s next ? Now we will launch SAS and examine the PROC GLIMMIX implementations of the three generalized linear mixed models. In addition, although beyond the scope of today’s presentation, I mention that there are versions of generalized linear mixed models that accommodate responses which are neither normally distributed nor dichotomous. The most common is a version that accommodates responses which are Poisson distributed; this is useful when the outcome of interest is a count (e.g., how many times a person engages in a particular behavior).