Longitudinal Data Analysis - Don Hedeker

Sample Programs, PDF Files, Datasets, and Examples

Much more information is at:
Don's 15-week course on Longitudinal Data Analysis


Longitudinal Continuous Data

Reading material: Hedeker, D. (2004). An introduction to growth modeling.  In D. Kaplan (Ed.), Quantitative Methodology for the Social Sciences. Thousand Oaks CA: Sage Publications. (pdf file)

Slides: Introduction to Mixed Models for Longitudinal Data for Longitudinal Continuous Data (pdf file)

Examples using SAS PROC MIXED:
1. Analysis of Riesby dataset.  This example has a few different PROC MIXED specifications, and includes a grouping variable and curvilinear effect of time. (SAS code and output)

2. This handout shows how empirical Bayes estimates can be output to a dataset in order to calculate estimated individual scores at all timepoints. (SAS code and output)

3.  This handout has the analysis considering the time-varying drug plasma levels, separating the within-subjects from the between-subjects effects for these time-varying covariates. (SAS code and output)

Datasets:

Riesby dataset – for examples 1 and 2, the variable order and names are indicated in the above syntax files.

Riesby dataset with time-varying covariates – for example 3, the variable order and names are indicated in the above syntax.

 

Examples using SPSS MIXED:
1. Analysis of Riesby dataset.  This example has a few different MIXED specifications, and includes a grouping variable and curvilinear effect of time.  It also shows how to get plots of the empirical Bayes estimates. (SPSS code)

2.  This handout has the analysis considering the time-varying drug plasma levels, separating the within-subjects from the between-subjects effects for these time-varying covariates. (SPSS code)

Datasets:

Riesby dataset  – a SPSS .SAV file - for example 1.

Riesby dataset with time-varying covariates – a SPSS .SAV file - for example 2.


Missing Values in Longitudinal Data

Reading material: Hedeker, D., & Gibbons, R.D. (1997).  Application of random-effects pattern-mixture models for missing data in longitudinal studies.  Psychological Methods, 2, 64-78. (pdf file)

Slides: Mixed Pattern-Mixture and Selection Models for Missing Data (pdf file)

Slides: Missing Data Mechanisms, MCAR tests, Mixed Pattern-Mixture and Selection Models for Missing Data (pdf file)

Examples using SAS PROC MIXED:

SCHZ_MCARtest.SAS - SAS code for time to dropout MCAR test using discrete-time survival analysis.  Shows how to create the person-period dataset. 

schizpm.sas - SAS code for pattern-mixture model analysis of NIMH Schizophrenia dataset.

schizsel.sas - SAS code for shared parameter (selection) model analysis of NIMH Schizophrenia dataset.

SCHIZREP.DAT - ASCII datafile for examples above.

Example using SPSS MIXED:
schizpm.sps - SPSS code for pattern-mixture model analysis of NIMH Schizophrenia dataset.

SCHIZREP.SAVSPSS  .SAV file for example above.


Longitudinal Dichotomous Data

 

Reading material: Hedeker, D. (2005).  Generalized linear mixed models.  In B. Everitt & D. Howell (Eds.),  Encyclopedia of Statistics in Behavioral Science. Wiley, New York.  (pdf file) 

Slides: Mixed Models for Longitudinal Dichotomous Data (pdf file)

Examples using SAS:
Analysis of the NIMH Schizophrenia dataset.  This handout provides SAS (PROC LOGISTIC, GLIMMIX, NLMIXED) code for running ordinary logistic regression and mixed-effects logistic regression.  (SAS code)

Dataset: SCHIZ dataset - the variable order and names are indicated in the example above.

PROC IML code to obtain marginalized probability estimates from the random intercept model estimates (SAS code)

PROC IML code to obtain marginalized probability estimates from the random trend model estimates   (SAS code)

GEE analysis of the NIMH Schizophrenia dataset using SAS PROC GENMOD (SAS code)


 Longitudinal Ordinal and Nominal Data

 

Reading material: Hedeker, D. (2008).  Multilevel models for ordinal and nominal variables.  In J. de Leeuw & E. Meijer (Eds.), Handbook of Multilevel Analysis.  Springer, New York.  (pdf file) 

Slides: Mixed Models for Longitudinal Ordinal and Nominal Data (pdf file)

Examples using SAS:
schzonl.sas - SAS code for mixed-effects proportional odds regression analysis of NIMH Schizophrenia data.  schizx1.dat - ASCII datafile.

schzofit.sas - SAS IML code to obtain marginal probability estimates based on mixed-effects proportional odds regression analysis of NIMH Schizophrenia data.

sandonl.sas - SAS code for mixed-effects proportional odds and non-proportional odds analyses of San Diego homelessness data. sdhouse.dat - ASCII datafile.

sandofit.sas - SAS IML code to obtain marginal probability estimates based on mixed-effects proportional odds and non-proportional odds regression analysis of San Diego homelessness data.

sandnnl.sas - SAS code for mixed-effects nomial regression analyses of San Diego homelessness data.

sandnfit.sas - SAS IML code to obtain marginal probability estimates based on mixed-effects inomial regression analysis of San Diego homelessness data.


Analysis of Binary Outcomes with Missing Data

Hedeker, D., Mermelstein, R.J., & Demirtas, H. (2008).  Analysis of Binary Outcomes with Missing Data: Missing=Smoking, Last Observatioin Carried Forward, and a Little Multiple Imputation.  Addiction, 102:1564-1573. (pdf file) (sas code)  (sas code description)  (data)

Overheads: (pdf file)

 


Analysis of Ecological Momentary Assessment (EMA) Data

 

Hedeker, D., Berbaum, M., & Mermelstein, R.J. (2006).  Location-scale models for multilevel ordinal data: between- and within-subjects variance modeling.  Journal of Probability and Statistical Science, 4, 1-20.  (pdf file)  (SAS code) 

 

Hedeker, D.,  Mermelstein, R.J., & Flay, B. R. (2006).  Application of item response theory models for intensive longitudinal data.  In T.A. Walls & J.L. Schafer (Eds.),  Models for Intensive Longitudinal Data (pp. 84-108).  Oxford University Press, New York.   (pdf file)  (SAS code)

 

Hedeker, D. & Mermelstein, R.J. (2007).  Mixed-effects regression models with heterogeneous variance: analyzing ecological momentary assessment data of smoking.  In T.D. Little, J.A. Bovaird, & N.A. Card (Eds.),  Modeling Contextual Effects in Longitudinal Studies.  Erlbaum: Mahwah, NJ.   (pdf file)  (SAS code)

 

Hedeker, D., Mermelstein, R.J., & Demirtas, H. (2008).  An application of a mixed-effects location scale model for analysis of Ecological Momentary Assessment (EMA) data.  Biometrics, 64, 627-634.  (pdf file)  (SAS code)

 

Hedeker, D., Mermelstein, R.J., Berbaum, M. & Campbell, R.T. (2009).  Modeling mood variation associated with smoking: An application of a heterogeneous mixed-effects model for analysis of Ecological Momentary Assessment (EMA) data.  Addiction, 104, 297-307.  (pdf file)  (SAS code description) 

 

Hedeker, D., Demirtas, H., & Mermelstein, R.J. (2009).  A mixed ordinal location scale model for analysis of Ecological Momentary Assessment (EMA) data.  Statistics and its Interface, 2, 391-401.  (pdf file)

 


Freeware Programs for Mixed-effects Regression Analysis of Categorical Outcomes

MIXOR - setup file for MIXOR (software for mixed-effects ordinal regression)

MIXOR documentation:

  • Mixorcm.PDF is the original MIXOR manual (same as Hedeker & Gibbons, 1996, MIXOR: a computer program for mixed-effects ordinal regression analysis, Computer Methods and Programs in Biomedicine, 49:157-176).
  • mixori.pdf is the user's guide for the program's Windows interface.
  • mixore2.PDF briefly describes extensions to original MIXOR, including program syntax, that are included in version 2.0. A more complete update will follow.
  • mixorex.PDF describes the datasets and definition files that are included with MIXOR version 2.0 to illustrate its new features. ns
  • mixore2b.pdf depicts the MIXOR screens for the examples used to illustrate MIXOR version 2.0 and its new features.


MIXNO - setup file for MIXNO (software for mixed-effects nominal logistic regression)

MIXNO documentation


mixnoi.pdf is the user's guide for the program's Windows interface.


Mixed-effects Logistic Regression Examples using MIXOR

schizb1.def

schizb2.def

MIXOR definition files for random intercept and random int & trend models of NIMH Schizophrenia dataset.

SCHIZX1.DAT - ASCII datafile for example above.

mixorsc1.sas - ASCII file with SAS IML code for marginalizing results of mixed-effects logistic regression.


Mixed-effects Ordinal Logistic Regression Examples using MIXOR

SCHIZO1.DEF

SCHIZO2.DEF

MIXOR definition files for random intercept and random int & trend models of NIMH Schizophrenia dataset.

SCHIZX1.DAT - ASCII datafile for example above.

mixorsc2.sas - ASCII file with SAS IML code for marginalizing results of mixed-effects ordinal logistic regression.


Mixed-effects Ordinal & Nominal Logistic Regression Examples using MIXOR and MIXNO

sdhous1.def proportional odds model: MIXOR

sdhous2.def non-proportional odds model: MIXOR

sdhouse.def nominal logistic regression model: MIXNO

MIXOR & MIXNO definition files for random intercept (ordinal & nominal) models - San Diego homeless dataset.

sdhouse.DAT - ASCII datafile for example above.

mixorsd2.sas - ASCII file with SAS IML code for marginalizing results of mixed-effects ordinal logistic regression.

mixnosd2.sas - ASCII file with SAS IML code for marginalizing results of mixed-effects nominal logistic regression.


More information:
Don's 15-week course on Longitudinal Data Analysis
The MIX website

Any questions or comments to Don: hedeker@uic.edu