Markov ordinal longitudinal model or discrete time multistate model for analysing recurrent event
Markov ordinal longitudinal model or discrete time multistate model for analysing recurrent event
Loading saved threads...
C.W. · External communityPost link
External question — Cross Validated Stack Exchange
Author: C.W.
Original post: https://stats.stackexchange.com/questions/669213
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Inspired by this discussion (
Martingale and Deviance residuals in parametric recurrent event analysis?
), I would like to extend it a bit for collecting more ideas and tips. To be clear, my questions are very much raised from pharmacometric perspective rather than biostatistic perspective, which is focused on investigating the dose–exposure (pharmacokinetics)–response relationship of a study compound. This focus doesn't stop at describing data from a single study but extends to exploring "what-if" scenarios — e.g., simulating different dosing strategies or patient profiles. The pharmacometric perspective, in my view, considers the selection of recurrent event modelling approach differently than what has been posted and discussed before at Cross Valided Forum.
My questions are based on the suggestions
using discrete time multistate model to deal recurrent event
. To my personal understanding, this approach divides the whole observation period into many time intervals and models the transition probabilities between states within each time interval. For recurrent clinical event, a typical two- or three-state setup could be:
s1: no event (at risk)
s2: event (i.e. rash)
s3: no longer at risk (absorbing state, e.g., end of study/death)
Possible transitions in each discrete time interval could be:
From \ To
s1 (No Event)
s2 (Event)
s3 (No Longer at Risk)
s1
✓
✓
✓
s2
✓
✓
✓
s3
✗
✗
✗
A
first-order Marcov process
may be assumed in this discrete multi-state model for dealing with the longitudinal feature. The goal of such a model is to estimate transition probabilities and the effects of covariates on those transitions. Beside, one can then simulate individual-level recurrence data by applying the transition matrix across time intervals. However, not all transitions to my understanding are necessarily well-informed by the data. For example, long inter-event periods from on subject can result in many s1 → s1 transitions with a dense time grid, contributing less information about our focus.
Assuming my understanding of this modeling framework is correct, I have following questions:
1. How to discretize time optimally
In real clinical data, recurrent events may occur at different time-intervals in different observational time frame. For instance, in the study by
Cox et al. 1999
, recurrent events occurred multiple times within 24 hours. Recurrent bleeding events may be following Gompertz hazard with negative shape parameter (
Abrantes et al 2019
) over a year. Event may also occur frequently early on (e.g., daily) and become less frequent later (e.g., weekly).
However, software implementations like
dtms
pacakge require equally spaced time intervals. I find it difficult to define a time grid that captures both fine granularity where events are dense and computational feasibility where events are sparse. The trade-off is between:
Having enough resolution to capture event dynamics
Avoiding an excessive number of Markov chains, which effectively leads to continuous multi-state model or simpler Andersen-Gill model.
Are there any recommended strategies or tips for choosing time intervals in such cases?
2. Dynamic in pharmacokinetics as covariate
In pharmacometric analysis, drug concentrations vary dynamically over time—sometimes drastically—depending on the compound type (e.g., small molecules vs. antibodies), individual variability, and dose adjustments. These time-varying covariates are often central to our model.
Incorporating such dynamically changing PK profiles into a discrete-time multistate model is challenging in my view in following aspects:
Time intervals are fixed, but drug concentration may change rapidly and non-linearly across or even within intervals. How can one align the dynamic in PK and state transition so that the PK influence can be sufficiently investigated?
The PK profile is individual-specific, often derived from a nonlinear mixed-effects model. It may require quite an effort to get the matching concentration via solving the
Ordinary Differential Equations (ODE)
based PK model within each discretized time interval for each subject in a sequential approach for the fitting. A sequntial approach derives the concentration of each individual at each time-interval and merges it with the mutistate data.
When it comes to simulation for answering the "what-if" questions, the joint model (PK and discrete-time multistate model together) is typically preferred, which involves
on-the-fly
solving PK related ODE, conditioned on randomly sampled individual-level parameters.
We do have dedicated pharmacometric tools such as
NONMEM
for such modeling. However, coding this in
NONMEM
is tedious: all transition matrices and probabilities must be manually coded, element by element, in Fortran style. This publication by
Niebecker et al
is one implementation of the Markov longitudinal model in pharmecometrics using
NONMEM
, which does not include the complex PK model part - the sequential way so to speak. The control stream (model script) of the publication can be found in its supplementary documents, which is very lengthy. This significantly increases model development time and complexity. I wonder if there is any package in R can handle this comprehensive modelling and simulation task with relatively less complex coding.
3. Lack of extrapolation beyond the observed time span
Because discrete-time multistate models are semi-parametric, they do not specify an underlying hazard function over continuous time. My concern is that this limits their ability to simulate recurrent events beyond the time span of the original observation window. Is there any way to address or mitigate this limitation?
Any insight into these points would be greatly appreciated.
Quote
Report
Frank Harrell · External communityPost link
External answer — Cross Validated Stack Exchange
Author: Frank Harrell
Original post: https://stats.stackexchange.com/a/669220
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Excellent questions. I can’t speak to the PK-specific stuff. Regarding long time spans without an event, this is not a problem at all. It just means that the probability of staying in the past state will be high, i.e, a regression coefficient will be large, and that the dataset may not be compact. The only thing that really matters is that you known the status in all time intervals.
A big advantage of discrete time models is the ability to extend states to any number of ordered states including continuous responses measured repeatedly.
Regarding the ability to extrapolate outside the observed time frame, multistate models make the same assumptions as other time-oriented models. First you have a nonlinear long-term trend in the transition model (e.g., regression spline in absolute elapsed time) and have to assume that this trend can be extrapolated. Secondly, when simulating data outside the original time span, you are assuming that impact of previous state maintains the same pattern over time, or interacts just with the assumped-extrapolatable long-term time trend function. When simulating long-span data you build one time period at a time with the parameter estimates you have for the transition model, and keep simulating more time periods until you get to the final point of interest.
In the traditional setting we use multistate models to estimate mean restricted survival time, for example, without extrapolating. If we want to estimate unrestricted mean survival time we’d have to extrapolate as I described above.
See
this
for more information.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External question — Cross Validated Stack Exchange Author: C.W. Source score (net votes, not local likes): 5 Original post: https://stats.stackexchange.com/questions/669213 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Inspired by this discussion ( Martingale and Deviance residuals in parametric recurrent event analysis? ), I would like to extend it a bit for collecting more ideas and tips. To be clear, my questions are very much raised from pharmacometric perspective rather than biostatistic perspective, which is focused on investigating the dose–exposure (pharmacokinetics)–response relationship of a study compound. This focus doesn't stop at describing data from a single study but extends to exploring "what-if" scenarios — e.g., simulating different dosing strategies or patient profiles. The pharmacometric perspective, in my view, considers the selection of recurrent event modelling approach differently than what has been posted and discussed before at Cross Valided Forum. My questions are based on the suggestions using discrete time multistate model to deal recurrent event . To my personal understanding, this approach divides the whole observation period into many time intervals and models the transition probabilities between states within each time interval. For recurrent clinical event, a typical two- or three-state setup could be: s1: no event (at risk) s2: event (i.e. rash) s3: no longer at risk (absorbing state, e.g., end of study/death) Possible transitions in each discrete time interval could be: From \ To s1 (No Event) s2 (Event) s3 (No Longer at Risk) s1 ✓ ✓ ✓ s2 ✓ ✓ ✓ s3 ✗ ✗ ✗ A first-order Marcov process may be assumed in this discrete multi-state model for dealing with the longitudinal feature. The goal of such a model is to estimate transition probabilities and the effects of covariates on those transitions. Beside, one can then simulate individual-level recurrence data by applying the transition matrix across time intervals. However, not all transitions to my understanding are necessarily well-informed by the data. For example, long inter-event periods from on subject can result in many s1 → s1 transitions with a dense time grid, contributing less information about our focus. Assuming my understanding of this modeling framework is correct, I have following questions: 1. How to discretize time optimally In real clinical data, recurrent events may occur at different time-intervals in different observational time frame. For instance, in the study by Cox et al. 1999 , recurrent events occurred multiple times within 24 hours. Recurrent bleeding events may be following Gompertz hazard with negative shape parameter ( Abrantes et al 2019 ) over a year. Event may also occur frequently early on (e.g., daily) and become less frequent later (e.g., weekly). However, software implementations like dtms pacakge require equally spaced time intervals. I find it difficult to define a time grid that captures both fine granularity where events are dense and computational feasibility where events are sparse. The trade-off is between: Having enough resolution to capture event dynamics Avoiding an excessive number of Markov chains, which effectively leads to continuous multi-state model or simpler Andersen-Gill model. Are there any recommended strategies or tips for choosing time intervals in such cases? 2. Dynamic in pharmacokinetics as covariate In pharmacometric analysis, drug concentrations vary dynamically over time—sometimes drastically—depending on the compound type (e.g., small molecules vs. antibodies), individual variability, and dose adjustments. These time-varying covariates are often central to our model. Incorporating such dynamically changing PK profiles into a discrete-time multistate model is challenging in my view in following aspects: Time intervals are fixed, but drug concentration may change rapidly and non-linearly across or even within intervals. How can one align the dynamic in PK and state transition so that the PK influence can be sufficiently investigated? The PK profile is individual-specific, often derived from a nonlinear mixed-effects model. It may require quite an effort to get the matching concentration via solving the Ordinary Differential Equations (ODE) based PK model within each discretized time interval for each subject in a sequential approach for the fitting. A sequntial approach derives the concentration of each individual at each time-interval and merges it with the mutistate data. When it comes to simulation for answering the "what-if" questions, the joint model (PK and discrete-time multistate model together) is typically preferred, which involves on-the-fly solving PK related ODE, conditioned on randomly sampled individual-level parameters. We do have dedicated pharmacometric tools such as NONMEM for such modeling. However, coding this in NONMEM is tedious: all transition matrices and probabilities must be manually coded, element by element, in Fortran style. This publication by Niebecker et al is one implementation of the Markov longitudinal model in pharmecometrics using NONMEM , which does not include the complex PK model part - the sequential way so to speak. The control stream (model script) of the publication can be found in its supplementary documents, which is very lengthy. This significantly increases model development time and complexity. I wonder if there is any package in R can handle this comprehensive modelling and simulation task with relatively less complex coding. 3. Lack of extrapolation beyond the observed time span Because discrete-time multistate models are semi-parametric, they do not specify an underlying hazard function over continuous time. My concern is that this limits their ability to simulate recurrent events beyond the time span of the original observation window. Is there any way to address or mitigate this limitation? Any insight into these points would be greatly appreciated.
Checking account access…