Software Credentialed Access

Time-dependent risk of seizures in critically ill patients on continuous electroencephalogram

Aaron F Struck Gamaleldin Osman Nishi Rampal Siddhartha Biswal Benjamin Legros Lawrence J. Hirsch M. Brandon Westover Nicolas Gaspard

Published: July 8, 2026. Version: 1.0.0


When using this resource, please cite: (show more options)
Struck, A. F., Osman, G., Rampal, N., Biswal, S., Legros, B., Hirsch, L. J., Westover, M. B., & Gaspard, N. (2026). Time-dependent risk of seizures in critically ill patients on continuous electroencephalogram (version 1.0.0). Brain Data Science Platform. https://doi.org/10.60508/8mm1-aj78.

Abstract

Objective. To find the optimal continuous EEG (cEEG) monitoring duration for seizure detection in critically ill patients.

Methods. We analyzed prospective data from 665 consecutive cEEGs, including clinical factors and time-to-event emergence of EEG findings over 72 hours. Clinical factors were selected with logistic regression; EEG risk factors were selected a priori. A multistate survival model with three states (entry, EEG-risk, and seizure) was built, where the EEG-risk state is defined by emergence of epileptiform patterns.

Results. The clinical variables of greatest predictive value were coma (OR 1.8) and history of seizures (OR 3.0). With no epileptiform EEG findings, 72-hour seizure risk ranged from 9% (no clinical risk factors) to 36% (coma and prior seizures); if epileptiform findings developed, from 18% to 64%. In the absence of epileptiform abnormalities, the monitoring duration needed for a seizure risk below 5% ranged from 0.4 h (not comatose, no prior seizure) to 16.4 h (comatose with prior seizure).

Interpretation. Initial seizure risk on cEEG depends on prior seizures and coma; the risk of developing seizures decays to under 5% by 24 hours if no epileptiform abnormalities emerge, independent of initial clinical risk.

This project provides the R (mstate) and MATLAB code and de-identified data to reproduce the multistate model and its prediction curves.


Background

Continuous EEG (cEEG) is used to detect seizures in critically ill patients, but the optimal monitoring duration is uncertain. This project releases the code and de-identified data for a multistate survival model that quantifies the time-dependent risk of seizures as a function of baseline clinical risk and emergent epileptiform EEG patterns.

Software Description

R and MATLAB source with de-identified data. tabledata2.txt is the multistate long-format survival data (surrogate sid); clinical_risk_factors_deid.xlsx holds the 665-record coded clinical/EEG table; apt*.csv and table_multistate.xlsx are the model's predicted state-probability curves. No MRNs, names, or dates.

Technical Implementation

Prospective data from 665 consecutive cEEGs were analyzed, including clinical factors and time-to-emergence of EEG findings over 72 hours. Clinical factors were selected by logistic regression and EEG risk factors a priori. A 3-state multistate survival model (entry, EEG-risk, seizure) was fit with the R mstate package; the EEG-risk state is defined by emergence of epileptiform patterns. Predicted seizure-risk curves were computed for combinations of clinical risk (prior seizures, coma) and EEG risk.

Installation and Requirements

R (>=3.x) with the mstate package (install.packages('mstate')); MATLAB for the figure scripts. No further installation. Run source('code/mState_sb5_predictionCurves.r') from the repo root. See REPRODUCE.md and DATA_SOURCE.md.

Usage Notes

Reproduce the multistate model with R + mstate (code/mState_sb5_predictionCurves.r, code/multi_state.R); render figures with the MATLAB scripts in code/. REPRODUCE.md maps each item to its script and committed input; DATA_SOURCE.md documents provenance and confirms the data are de-identified.

Release Notes

First public release: R/MATLAB code + de-identified data + reproduction docs.

Ethics

Data were collected under IRB approval at the participating centers; all released data are de-identified.

Acknowledgements

Data from the Critical Care EEG Monitoring Research Consortium (Yale University and the Free University of Brussels).

Conflicts of Interest

See the associated publication (Ann Neurol 2017;82:177-185) for author disclosures.
Share
Access

Access Policy:
Only credentialed users who sign the DUA can access the files.

License (for files):
BDSP Credentialed Health Data License 1.5.0

Data Use Agreement:
BDSP Credentialed Health Data Use Agreement

Required training:

Corresponding Author
You must be logged in to view the contact information.

Files