The rest-to-active and active-to-rest transition hazards against bout length,
with a LOWESS fit and the sustained rates kRA and kAR marked. Returns a
ggplot object and never errors.
References
Lim ASP, Yu L, Costa MD, Buchman AS, Bennett DA, Leurgans SE, Saper CB (2011). “Quantification of the fragmentation of rest-activity patterns in elderly individuals using a state transition analysis.” Sleep, 34(11), 1569–1581. doi:10.5665/sleep.1400 .
Examples
set.seed(1)
plot_transitions(as.integer(stats::runif(8000) < 0.1) * 100)
