II-026

Continuous-time Markov models: Investigation into the use of Stan and msm for fitting disease progression models for EDSS in multiple sclerosis

Gordon Graham1, Tomas Sou1

1Novartis

Introduction: NO.MS is the largest multiple sclerosis (MS) dataset of pooled clinical trials from Novartis, containing data from 35000 patients across RRMS, SPMS and PPMS with up to 15 years of follow-up, including demographic, clinical, imaging and meta data [1]. NO.MS has been used to investigate disability acquisition, factors related to disease progression and the effect of disease-modifying therapies [2,3]. In particular, disease progression modelling has been performed on the expanded disability status scale (EDSS) to explore time between disability milestones and investigate factors that influence disability progression [2,3]. EDSS is a clinical scale with 20 ordered categories that has been modelled using continuous time Markov models (CTMMs) [3,4]. Scaling CTMMs to fit data with increasing numbers of categories is challenging. The multistate modelling package msm in R is a natural choice for maximum likelihood estimation but can encounter numerical instabilities as the number of states and sample size increases, such as that found in NO.MS [5]. To this end, a scalable maximum likelihood estimation approach has previously been developed [5]. In addition, Bayesian modelling using bespoke R coding has also been developed for EDSS [3]. To further develop the EDSS disease progression modelling for NO.MS, Stan is being explored as a possible alternative, and a more general tool, for fitting multistate models and their extensions. Objectives: This work aims to provide an initial evaluation of the application of Stan and the msm package in R for fitting continuous-time Markov models. Methods: Stan code for CTMMs in Rushing (2023) was adapted to fit the models in this study [6]. Data were simulated from 2- and 4-state models, with full transition rate matrices, and an 8-state model with a tri-diagonal matrix where all non-tri-diagonal transition rates were set to 0. These models were fitted with/without covariates included on the transition rates. For this simulation-estimation study, different sample sizes and sampling designs for the panel data were simulated for each model scenario. The cmdstan package was used to estimate the CTMM models in R. The simulated datasets were also fitted with the msm package in R. Results: Stan was able to fit the range of model and design scenarios evaluated, including for different numbers of states, sample sizes, sampling designs and with/without covariate effects. Stan encountered memory problems for larger datasets and models with more states and parameters, as well as being slower to run due to Markov Chain Monte-Carlo (MCMC) sampling, which may be alleviated by running the models in an optimised high performance computing environment. The msm package was able to fit the models when the number of states were 4 or less but encountered numerical issues when there were 8 states, as previously discussed [5]. In terms of sampling designs, both Stan and msm produced biased estimates when the sampling time intervals were longer than the true sojourn times, reflecting the importance of informative study design in CTMMs. Conclusion: These initial simulation results demonstrate that Stan is able to fit CTMMs across the initial range of models and data scenarios that were explored. Stan provides for the specification of full probability models. This capability potentially allows for the extension of EDSS disease progression models to include the modelling of other variables as time-varying predictors of the EDSS transition rates.

 [1] Dahlke F et al. Mult Scler (2021) 27(13):2062–2076.   [2] Lublin FD et al. Brain (2022) 145(9):3147-3161.   [3] Ocampo A et al. Mult Scler (2024) 30(11-12):1455-1467.   [4] Mandel M. Biostatistics. 2010 Apr;11(2):304-16.   [5] Hatami F et al. Biostatistics (2024) 25(3):681-701.   [6] Rushing CS. J Anim Ecol (2023) 92(4):936-944. 

Reference: PAGE 33 (2025) Abstr 11452 [www.page-meeting.org/?abstract=11452]

Poster: Methodology - New Modelling Approaches

PDF poster / presentation (click to open)