8
$\begingroup$

I have ~400 individuals and >10k timepoints each (simulation results) I would like to be able to monitor as they change over the course of time. Plotting all individuals is too messy, plotting mean +-sd, min/max, or quantiles is too little information for my taste. I am wondering what other people have come up with to visualize this type of data. If there were fewer data points I would use beanplots for each timepoint, but that would not work for so many timepoints.

$\endgroup$
  • $\begingroup$ Are you looking to examine repeated measures (distribution of values within person level clusters) or panel results (functions of response variable within person over time) or are you just examining outcomes as a function of time? Bean plots (or violin plots) ignore clustering, but can be used to visualize observations that are discrete in time. Have you considered popular smoothers like LOESS or smoothing splines? $\endgroup$ – AdamO Jan 29 '14 at 20:17
  • $\begingroup$ @AdamO I just want to see distribution of outcomes over time. I am interested in how the distribution of an individual level statistic ("activity-level") changes as a way of watching a network of individuals. Each of the individuals interacts with a subset of the others, this also changes over time. $\endgroup$ – Livid Jan 29 '14 at 20:59
  • $\begingroup$ Smoothers are capable of doing that. It's not a spaghetti plot which shows individual stats, but you can visualize an averaged trend over time. $\endgroup$ – AdamO Jan 29 '14 at 21:27
  • $\begingroup$ @AdamO I don't understand the suggestion of smoothing since I can simply plot the average at each timestep to see that. $\endgroup$ – Livid Jan 29 '14 at 21:43
  • 1
    $\begingroup$ @Glen_b I would just calculate quantiles at each timepoint and make a timeseries out of those rather than use boxplots, I expect to see complex distributions though. $\endgroup$ – Livid Jan 29 '14 at 23:48
1
$\begingroup$

I would either use a smoother, such as:

geom_smooth(method='loess')

or I would subsample your data and plot only every 5 individuals, and every 10 time steps (for example).

library(ggplot2)    
# Data looks like:
#   Subject   Timestep  Y
#   1         1         0.5
#   1         2         0.6    
#   1         3         0.6
#   1         4         0.7
temp=subset(data, ((as.numeric(subject)%%5)==0) & ((as.numeric(Timestep)%%10)==0))
qplot(Timestep,Y,data=temp)

or both.

$\endgroup$
1
$\begingroup$

These are some great suggestions. My suggestion is to use half-violin plots as shown in http://biostat.mc.vanderbilt.edu/HmiscNew using the R Hmisc package summaryS function and lattice graphics.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.