Software Credentialed Access

Effects of epileptiform activity on discharge outcome in critically ill patients

Harsh Parikh Kentaro Hoffman Haoqi Sun Sahar F. Zafar Wendong Ge Jin Jing Lin Liu Jimeng Sun Aaron F Struck Alexander Volfovsky Cynthia Rudin M. Brandon Westover

Published: July 11, 2026. Version: 1.0.1


When using this resource, please cite: (show more options)
Parikh, H., Hoffman, K., Sun, H., Zafar, S. F., Ge, W., Jing, J., Liu, L., Sun, J., Struck, A. F., Volfovsky, A., Rudin, C., & Westover, M. B. (2026). Effects of epileptiform activity on discharge outcome in critically ill patients (version 1.0.1). Brain Data Science Platform. https://doi.org/10.60508/6zn1-1161.

Additionally, please cite the original publication:

Parikh H, Hoffman K, Sun H, Zafar SF, Ge W, Jing J, Liu L, Sun J, Struck AF, Volfovsky A, Rudin C, Westover MB. Effects of epileptiform activity on discharge outcome in critically ill patients in the USA: a retrospective cross-sectional study. Lancet Digit Health. 2023;5(8):e495-e502. PMID: 37295971.

Abstract

Background. Epileptiform activity (EA) — seizures and the ictal-interictal continuum — is common on continuous EEG in critically ill patients, but whether, and how much, EA burden causes worse outcomes (as opposed to marking sicker patients) has been difficult to establish. This project releases de-identified data and a self-contained reproduction pipeline for a causal-inference study of this question.

Methods. In critically ill adults on continuous EEG, per-patient EA burden was quantified from 2-second EEG segments. Each patient's response to antiseizure medication was modelled with a one-compartment pharmacokinetic model and a Hill/auto-regressive pharmacodynamic model, allowing simulation of the counterfactual EA burden in the absence of treatment. The causal effect of untreated EA burden on poor discharge outcome (modified Rankin Scale ≥ 4) was estimated by MALTS (Matching After Learning To Stretch) matching on clinical and pharmacodynamic confounders.

Results. Higher untreated EA burden was associated with a higher probability of poor outcome in a dose-dependent manner. This release contains the de-identified analysis data (EA-burden time series, drug dosing, confounders, discharge outcome for ~1,300 patients), the fitted PK-PD simulator and parameters, the MALTS estimator, and a one-command script that reproduces the paper's headline causal estimates.


Background

Epileptiform activity (seizures and the ictal-interictal continuum) is common on continuous EEG in critically ill patients; establishing its causal effect on outcome, distinct from confounding by severity and treatment, is difficult. This project releases data and code for a causal-inference study of untreated EA burden and discharge outcome.

Software Description

De-identified analysis inputs (per-patient EA-burden and spike-rate time series, drug-dose time series, 70 clinical confounders, discharge mRS; ~1,300 patients), per-patient PK-PD parameters, the PK-PD simulator (simulator.py), the MALTS estimator (malts_haoqi_modified.py), curated covariate/outcome tables, and reproduce_lancet.py (end-to-end reproduction). All identifiers are surrogate sid#; no names, MRNs, or dates.

Technical Implementation

Per-patient EA burden was quantified from 2s EEG segments. Antiseizure-medication response was modelled with one-compartment pharmacokinetics and a Hill/AR pharmacodynamic model to simulate the untreated (drug-free) counterfactual EA burden. The causal increase in probability of poor discharge outcome (mRS>=4) by EA-burden level was estimated with MALTS matching on clinical and pharmacodynamic confounders.

Installation and Requirements

Python 3 with numpy, pandas, scipy, scikit-learn, jax, numpyro, joblib. See REPRODUCE.md. Run: python3 reproduce_lancet.py --exposure counterfactual --win6h --pkpd_covs --exclusions --cap_ref 250 --ntrial 60 --eamean_seeds 1 --n_boot 500

Usage Notes

reproduce_lancet.py reproduces EAmean 2-<10% -> +12.58% (paper +13.52%). reproduce_lancet_posterior.py, using the included 28GB full Bayesian posterior (model_E_AR1.pickle) for a peak-preserving untreated counterfactual, reproduces EAmax >=75% -> +22.34% (paper +22.27%) -- essentially exact. Both headline causal estimands now reproduce (n=996 after the paper's exclusions). See REPRODUCTION_RESULT.md.

Release Notes

v1.0.1: exact reproduction of both headline causal estimands via the full Bayesian posterior.

Ethics

De-identified data under IRB approval; numeric analysis matrices keyed by surrogate sid#, no identifiers. Date-bearing source files and pseudo-MRNs were excluded/removed.

Acknowledgements

Data from the MGH critical-care continuous-EEG cohort. Causal-inference methodology (MALTS) developed with collaborators at Duke University.

Conflicts of Interest

See the associated publication (Lancet Digit Health 2023;5:e495-e502).

References

  1. Parikh H, Hoffman K, Sun H, Zafar SF, Ge W, Jing J, Liu L, Sun J, Struck AF, Volfovsky A, Rudin C, Westover MB. Effects of epileptiform activity on discharge outcome in critically ill patients in the USA: a retrospective cross-sectional study. Lancet Digit Health. 2023;5(8):e495-e502. PMID: 37295971.

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.
Versions

Files