Skip to main content
Top
Published in: BMC Medical Research Methodology 1/2014

Open Access 01-12-2014 | Research article

Visualising and modelling changes in categorical variables in longitudinal studies

Authors: Mark Jones, Richard Hockey, Gita D Mishra, Annette Dobson

Published in: BMC Medical Research Methodology | Issue 1/2014

Login to get access

Abstract

Background

Graphical techniques can provide visually compelling insights into complex data patterns. In this paper we present a type of lasagne plot showing changes in categorical variables for participants measured at regular intervals over time and propose statistical models to estimate distributions of marginal and transitional probabilities.

Methods

The plot uses stacked bars to show the distribution of categorical variables at each time interval, with different colours to depict different categories and changes in colours showing trajectories of participants over time. The models are based on nominal logistic regression which is appropriate for both ordinal and nominal categorical variables. To illustrate the plots and models we analyse data on smoking status, body mass index (BMI) and physical activity level from a longitudinal study on women’s health. To estimate marginal distributions we fit survey wave as an explanatory variable whereas for transitional distributions we fit status of participants (e.g. smoking status) at previous surveys.

Results

For the illustrative data the marginal models showed BMI increasing, physical activity decreasing and smoking decreasing linearly over time at the population level. The plots and transition models showed smoking status to be highly predictable for individuals whereas BMI was only moderately predictable and physical activity was virtually unpredictable. Most of the predictive power was obtained from participant status at the previous survey. Predicted probabilities from the models mostly agreed with observed probabilities indicating adequate goodness-of-fit.

Conclusions

The proposed form of lasagne plot provides a simple visual aid to show transitions in categorical variables over time in longitudinal studies. The suggested models complement the plot and allow formal testing and estimation of marginal and transitional distributions. These simple tools can provide valuable insights into categorical data on individuals measured at regular intervals over time.
Appendix
Available only for authorised users
Literature
1.
go back to reference Hedeker D, Gibbons R: Longitudinal data analysis. 2006, Hoboken, New Jersey: John Wiley and Sons Hedeker D, Gibbons R: Longitudinal data analysis. 2006, Hoboken, New Jersey: John Wiley and Sons
2.
go back to reference Swihart B, Caffo B, James B, Strand M, Schwartz B, Punjabi N: Lasagna plots: a saucy alternative to spaghetti plots. Epidemiology. 2010, 21: 621-625. 10.1097/EDE.0b013e3181e5b06a.CrossRefPubMedPubMedCentral Swihart B, Caffo B, James B, Strand M, Schwartz B, Punjabi N: Lasagna plots: a saucy alternative to spaghetti plots. Epidemiology. 2010, 21: 621-625. 10.1097/EDE.0b013e3181e5b06a.CrossRefPubMedPubMedCentral
3.
go back to reference Wilkinson L, Friendly M: The history of the cluster heat map. Am Stat. 2009, 63: 179-184. 10.1198/tas.2009.0033.CrossRef Wilkinson L, Friendly M: The history of the cluster heat map. Am Stat. 2009, 63: 179-184. 10.1198/tas.2009.0033.CrossRef
4.
go back to reference Dobson AJ, Barnett A: An Introduction to Generalized Linear Models. 2008, Boca Raton, Florida: Chapman & Hall/CRC, 3 Dobson AJ, Barnett A: An Introduction to Generalized Linear Models. 2008, Boca Raton, Florida: Chapman & Hall/CRC, 3
5.
go back to reference Lee C, Dobson AJ, Brown WJ, Bryson L, Byles J, Warner-Smith P, Young AF: Cohort profile: the Australian Longitudinal Study on Women's Health. Int J Epidemiol. 2005, 34: 987-991. 10.1093/ije/dyi098.CrossRefPubMed Lee C, Dobson AJ, Brown WJ, Bryson L, Byles J, Warner-Smith P, Young AF: Cohort profile: the Australian Longitudinal Study on Women's Health. Int J Epidemiol. 2005, 34: 987-991. 10.1093/ije/dyi098.CrossRefPubMed
6.
go back to reference Brown WJ, Trost SG: Life transitions and changing physical activity patterns in young women. Am J Prev Med. 2003, 25: 140-143. 10.1016/S0749-3797(03)00119-3.CrossRefPubMed Brown WJ, Trost SG: Life transitions and changing physical activity patterns in young women. Am J Prev Med. 2003, 25: 140-143. 10.1016/S0749-3797(03)00119-3.CrossRefPubMed
7.
go back to reference Ware J, Lipsitz S, Speizer F: Issues in the analysis of repeated categorical outcomes. Stat Med. 1988, 7: 95-107. 10.1002/sim.4780070113.CrossRefPubMed Ware J, Lipsitz S, Speizer F: Issues in the analysis of repeated categorical outcomes. Stat Med. 1988, 7: 95-107. 10.1002/sim.4780070113.CrossRefPubMed
8.
go back to reference Long J: Regression Models for Categorical and Limited Dependent Variables. 1997, Thousand Oaks: Sage Publications Long J: Regression Models for Categorical and Limited Dependent Variables. 1997, Thousand Oaks: Sage Publications
9.
go back to reference Friendly M: Mosaic displays for multi-way contingency tables. J Am Stat Assoc. 1994, 89: 190-200. 10.1080/01621459.1994.10476460.CrossRef Friendly M: Mosaic displays for multi-way contingency tables. J Am Stat Assoc. 1994, 89: 190-200. 10.1080/01621459.1994.10476460.CrossRef
10.
go back to reference Kosara R: Parallel sets: interactive exploration and visual analysis of categorical data. Trans on Visualization and Comput Graph. 2006, 12: 1-12.CrossRef Kosara R: Parallel sets: interactive exploration and visual analysis of categorical data. Trans on Visualization and Comput Graph. 2006, 12: 1-12.CrossRef
11.
go back to reference Schmidt M: Der Einsatz von sankey-diagrammen im stoffstrommanagement. Beitraege der Hochschule Pforzheim. 2006, Nr. 124 Schmidt M: Der Einsatz von sankey-diagrammen im stoffstrommanagement. Beitraege der Hochschule Pforzheim. 2006, Nr. 124
Metadata
Title
Visualising and modelling changes in categorical variables in longitudinal studies
Authors
Mark Jones
Richard Hockey
Gita D Mishra
Annette Dobson
Publication date
01-12-2014
Publisher
BioMed Central
Published in
BMC Medical Research Methodology / Issue 1/2014
Electronic ISSN: 1471-2288
DOI
https://doi.org/10.1186/1471-2288-14-32

Other articles of this Issue 1/2014

BMC Medical Research Methodology 1/2014 Go to the issue