Idiographic Lapse Prediction With State Space Modeling: Algorithm Development and Validation Study
- PMID: 40460422
- PMCID: PMC12174888
- DOI: 10.2196/73265
Idiographic Lapse Prediction With State Space Modeling: Algorithm Development and Validation Study
Abstract
Background: Many mental health conditions (eg, substance use or panic disorders) involve long-term patient assessment and treatment. Growing evidence suggests that the progression and presentation of these conditions may be highly individualized. Digital sensing and predictive modeling can augment scarce clinician resources to expand and personalize patient care. We discuss techniques to process patient data into risk predictions, for instance, the lapse risk for a patient with alcohol use disorder (AUD). Of particular interest are idiographic approaches that fit personalized models to each patient.
Objective: This study bridges 2 active research areas in mental health: risk prediction and time-series idiographic modeling. Existing work in risk prediction has focused on machine learning (ML) classifier approaches, typically trained at the population level. In contrast, psychological explanatory modeling has relied on idiographic time-series techniques. We propose state space modeling, an idiographic time-series modeling framework, as an alternative to ML classifiers for patient risk prediction.
Methods: We used a 3-month observational study of participants (N=148) in early recovery from AUD. Using once-daily ecological momentary assessment (EMA), we trained idiographic state space models (SSMs) and compared their predictive performance to logistic regression and gradient-boosted ML classifiers. Performance was evaluated using the area under the receiver operating characteristic curve (AUROC) for 3 prediction tasks: same-day lapse, lapse within 3 days, and lapse within 7 days. To mimic real-world use, we evaluated changes in AUROC when models were given access to increasing amounts of a participant's EMA data (15, 30, 45, 60, and 75 days). We used Bayesian hierarchical modeling to compare SSMs to the benchmark ML techniques, specifically analyzing posterior estimates of mean model AUROC.
Results: Posterior estimates strongly suggested that SSMs had the best mean AUROC performance in all 3 prediction tasks with ≥30 days of participant EMA data. With 15 days of data, results varied by task. Median posterior probabilities that SSMs had the best performance with ≥30 days of participant data for same-day lapse, lapse within 3 days, and lapse within 7 days were 0.997 (IQR 0.877-0.999), 0.999 (IQR 0.992-0.999), and 0.998 (IQR 0.955-0.999), respectively. With 15 days of data, these median posterior probabilities were 0.732, <0.001, and <0.001, respectively.
Conclusions: The study findings suggest that SSMs may be a compelling alternative to traditional ML approaches for risk prediction. SSMs support idiographic model fitting, even for rare outcomes, and can offer better predictive performance than existing ML approaches. Further, SSMs estimate a model for a patient's time-series behavior, making them ideal for stepping beyond risk prediction to frameworks for optimal treatment selection (eg, administered using a digital therapeutic platform). Although AUD was used as a case study, this SSM framework can be readily applied to risk prediction tasks for other mental health conditions.
Keywords: alcohol use disorder; digital health; digital therapeutics; mHealth; mental health; mobile health; personalized medicine; substance use disorder.
©Eric Pulick, John Curtin, Yonatan Mintz. Originally published in JMIR Formative Research (https://formative.jmir.org), 03.06.2025.
Conflict of interest statement
Conflicts of Interest: None declared.
Figures





Similar articles
-
Acceptability of Personal Sensing Among People With Alcohol Use Disorder: Observational Study.JMIR Mhealth Uhealth. 2023 Aug 28;11:e41833. doi: 10.2196/41833. JMIR Mhealth Uhealth. 2023. PMID: 37639300 Free PMC article.
-
Prescriptive Predictors of Mindfulness Ecological Momentary Intervention for Social Anxiety Disorder: Machine Learning Analysis of Randomized Controlled Trial Data.JMIR Ment Health. 2025 May 13;12:e67210. doi: 10.2196/67210. JMIR Ment Health. 2025. PMID: 40359509 Free PMC article. Clinical Trial.
-
Assessing the comparative effects of interventions in COPD: a tutorial on network meta-analysis for clinicians.Respir Res. 2024 Dec 21;25(1):438. doi: 10.1186/s12931-024-03056-x. Respir Res. 2024. PMID: 39709425 Free PMC article. Review.
-
Designing an Implementable Clinical Prediction Model for Near-Term Mortality and Long-Term Survival in Patients on Maintenance Hemodialysis.Am J Kidney Dis. 2024 Jul;84(1):73-82. doi: 10.1053/j.ajkd.2023.12.013. Epub 2024 Feb 21. Am J Kidney Dis. 2024. PMID: 38493378 Free PMC article.
-
The Use of Machine Learning for Analyzing Real-World Data in Disease Prediction and Management: Systematic Review.JMIR Med Inform. 2025 Jun 19;13:e68898. doi: 10.2196/68898. JMIR Med Inform. 2025. PMID: 40537090 Free PMC article.
References
-
- Borsboom D, Deserno MK, Rhemtulla M, Epskamp S, Fried EI, McNally RJ, Robinaugh DJ, Perugini M, Dalege J, Costantini G, Isvoranu A, Wysocki AC, van Borkulo CD, van Bork R, Waldorp LJ. Network analysis of multivariate data in psychological science. Nat Rev Methods Primers. 2021 Aug 19;1(1):58. doi: 10.1038/s43586-021-00055-w. - DOI
-
- Chekroud AM, Bondar J, Delgadillo J, Doherty G, Wasil A, Fokkema M, Cohen Z, Belgrave D, DeRubeis R, Iniesta R, Dwyer D, Choi K. The promise of machine learning in predicting treatment outcomes in psychiatry. World Psychiatry. 2021 Jun 18;20(2):154–170. doi: 10.1002/wps.20882. https://europepmc.org/abstract/MED/34002503 - DOI - PMC - PubMed
-
- Deisenhofer A, Barkham M, Beierl ET, Schwartz B, Aafjes-van Doorn K, Beevers CG, Berwian IM, Blackwell SE, Bockting CL, Brakemeier E, Brown G, Buckman JE, Castonguay LG, Cusack CE, Dalgleish T, de Jong K, Delgadillo J, DeRubeis RJ, Driessen E, Ehrenreich-May J, Fisher AJ, Fried EI, Fritz J, Furukawa TA, Gillan CM, Gómez Penedo J M, Hitchcock PF, Hofmann SG, Hollon SD, Jacobson NC, Karlin DR, Lee CT, Levinson CA, Lorenzo-Luaces L, McDanal R, Moggia D, Ng MY, Norris LA, Patel V, Piccirillo ML, Pilling S, Rubel JA, Salazar-de-Pablo G, Schleider JL, Schnurr PP, Schueller SM, Siegle GJ, Uher R, Watkins E, Webb CA, Wiltsey Stirman S, Wynants L, Youn SJ, Zilcha-Mano S, Lutz W, Cohen ZD. Implementing precision methods in personalizing psychological therapies: Barriers and possible ways forward. Behav Res Ther. 2024 Jan;172:104443. doi: 10.1016/j.brat.2023.104443. https://linkinghub.elsevier.com/retrieve/pii/S0005-7967(23)00191-2 S0005-7967(23)00191-2 - DOI - PubMed
-
- Nahum-Shani I, Smith SN, Spring BJ, Collins LM, Witkiewitz K, Tewari A, Murphy SA. Just-in-time adaptive interventions (JITAIs) in mobile health: key components and design principles for ongoing health behavior support. Ann Behav Med. 2018 May 18;52(6):446–462. doi: 10.1007/s12160-016-9830-8. https://europepmc.org/abstract/MED/27663578 10.1007/s12160-016-9830-8 - DOI - PMC - PubMed
-
- Andersson G, Titov N, Dear BF, Rozental A, Carlbring P. Internet-delivered psychological treatments: from innovation to implementation. World Psychiatry. 2019 Feb;18(1):20–28. doi: 10.1002/wps.20610. https://europepmc.org/abstract/MED/30600624 - DOI - PMC - PubMed
Publication types
MeSH terms
LinkOut - more resources
Full Text Sources
Medical
Research Materials