Related Experiment Video
Updated: Aug 4, 2025

A Computational Method to Quantify Fly Circadian Activity
Published on: October 28, 2017
Combining mixed effects hidden Markov models with latent alternating recurrent event processes to model diurnal
1Department of Biostatistics, Epidemiology, and Informatics, University of Pennsylvania, Pennsylvania, PA, USA.
Abstract:
Data collected from wearable devices can shed light on an individual's pattern of behavioral and circadian routine. Phone use can be modeled as alternating processes, between the state of active use and the state of being idle. Markov chains and alternating recurrent event models are commonly used to model state transitions in cases such as these, and the incorporation of random effects can be used to introduce diurnal effects. While state labels can be derived prior to modeling dynamics, this approach omits informative regression covariates that can influence state memberships. We instead propose an alternating recurrent event proportional hazards (PH) regression to model the transitions between latent states. We propose an expectation-maximization algorithm for imputing latent state labels and estimating parameters. We show that our E-step simplifies to the hidden Markov model (HMM) forward-backward algorithm, allowing us to recover an HMM with logistic regression transition probabilities. In addition, we show that PH modeling of discrete-time transitions implicitly penalizes the logistic regression likelihood and results in shrinkage estimators for the relative risk. This new estimator favors an extended stay in a state and is useful for modeling diurnal rhythms. We derive asymptotic distributions for our parameter estimates and compare our approach against competing methods through simulation as well as in a digital phenotyping study that followed smartphone use in a cohort of adolescents with mood disorders.
Related Concept Videos
Sleep-Wake Cycles
NREM Sleep
NREM sleep comprises four progressive stages that seamlessly merge:
Mechanistic Models: Compartment Models in Individual and Population Analysis
Noncompartmental Analysis: Mean Residence Time
After the administration of a drug through intravenous bolus injection, the drug molecules are distributed throughout the body and remain there for varying periods. The MRT represents the average time these drug molecules stay in the...
Multicompartment Models: Overview
These models offer a more comprehensive representation of drug behavior in the body than one-compartment models. They accommodate the complexity of drug distribution,...
Model Approaches for Pharmacokinetic Data: Distributed Parameter Models
The distributed parameter models are specifically designed to account for variations and differences in some drug classes. This model is particularly useful for assessing regional concentrations of anticancer or...
Model Approaches for Pharmacokinetic Data: Physiological Models

