How to apply a probability based on time since entering that transition health state

I am creating a Markov Model for a cost-effective analysis of various colon cancer chemotherapy treatments. The cohort entering the model has just had surgery for colon cancer, and there are 6 Markov nodes, each for a different chemotherapy treatment. 

I am trying to apply a different transition probability from alive to death from colon cancer for patients who have a cancer recurrence. 

The health states in each Markov node in our tree are: Disease Free, Recur 0-2 Years, Recur 2-3 Years, Recur >3 Years, Death from All Causes, and Death from Colon Cancer. The three "Recur..." health states are to divide the patients by the time since initial surgery that they experience a recurrence, since each of these 3 intervals has a difference probability of death after recurrence. 

In each of the "Recur..." health states, the patient either dies from all causes, dies from colon cancer, or lives with cancer post-recurrence (returning to this same recurrence health state). For example, in the "Recur 0-2 Years post-surgery" health state, the patient will either:

  1. Die from All Causes (go to Death from All Causes health state) 
  2. Live with colon cancer post-recurrence (return to Recur 0-2 Years health state)
  3. Die from Colon Cancer (go to Death from Colon Cancer health state)

Within this "Recur 0-2 Years" health state, I am trying to apply a transition probability for death from colon cancer based on the time since the recurrence, essentially, a probability dependent on the time that a patient has been in this health state. So for example,

  1. from 0-6 months from the time of recurrence, p_death_colonCA = 0.4
  2. from 6-12 months from the time of recurrence, p_death_colonCA = 0.5,

etc. for 6 month intervals. 

I attempted to do this using a table with probability values for each 6 month interval post-recurrence, applying the table to tunnels. The table of death probabilities goes from 0-66 months post-recurrence, or 11 intervals, so I set the tunnel max = 11, and

p_death_colonCA = t_death_colonCA_recur_0-2years[_tunnel],

but I do not think that this applied the tunnels correctly. 


Is there a method to apply this table of probability values that differ for each 6 month interval based on the time since entering this health state, rather than by stage? If the only way to do this is by using tunnels, since this is a cohort analysis, am I applying the tunnels incorrectly? How do you set each of the 11 tunnels in this case to be equivalent to 6 month intervals?



  • Hi Sarah

    If I understand your structure, the recurrence health states are sequenced: if you avoid recurrence or death in recur_0_2, you move to recur_2_3 and if you avoid those outcomes in that state, you move to recur>3. Because these states have to occur one after another and because the first two are of fixed duration you can use _stage. Assuming your cycle length is 6 months, in the cycle tree for the first state, you could have a chance node for cancer death (the per cycle probability for the first two years), if not then a chance node for all cause mortality, if not then a logic node. The upper branch would have the condition _stage = 4 and the bottom branch #. The top branch is a terminal node leading to recur_2_3 and the bottom a terminal node connecting to recur_1_2. Basically, if the current value of _stage is 4, it means 24 months have elapsed and on the next cycle patients should be in recur_2_3. The same structure could be used in the latter state but with _stage = 6 as the condition on the top branch of the logic node.

    This means that you can use a table of cancer death probabilities but indexed by _stage rather than _tunnel: pDeath_colonCa = tDeath[_stage]. For index 0 the value is 0.4 (0 to 6 months), for index 1 the value is 0.5 (6 to 12 months) etc.

    Does this help?

    David Naimark


    Comment actions Permalink
  • Thanks, David.

    I think David's approach will work if everyone in the model has just had a recurrence. If instead people could have the recurrence in a future cycle, then you would need to use tunnels (cohort model) or trackers (simulation model) to know when the recurrence occurred and how long it has been since then.

    Tunnels track time in state. If you need that counter to continue as a patient moves from one state to the next, then you will need special Tunnel Crossover State Bindings to continue the counter among states.

    In a simulation model, you could record the time of recurrence in a tracker then calculate the time elapsed since then.


    Comment actions Permalink
  • Andrew is right - I was thinking on terms of sequencing recurrences. I have an example tree that might solve your issue Sarah. Would you like me to send it to you? I'm at

    Comment actions Permalink
  • Thank you David and Andrew for your feedback. In my tree, yes, Andrew you are right that not all patients will have a recurrence, so there is a different probability of recurrence being applied to 0-2 years, 2-3 years, and >3 years post-surgery (at _stage = 0). Our cycle length is monthly. 

    Andrew, would you be able to explain how to apply the tunnels correctly in this case? I think the issue we are facing is that I ideally need each tunnel state to be a length of 6 months (since the probabilities of death after recurrence change every 6 months) but I cannot figure out how to partition patients into tunnels by these 6 month intervals. 

    David, thank you for your willingness to share your tree, I think it could definitely help! I am sending you an email. 

    Comment actions Permalink
  • Tunnels track time in state by cycle, so as tunnel increments by 1, that will be 6 months in your model.

    You need to think about when the time starts and when it resets. Is it right away because you are post surgery, then _stage will work well. Does that reset after a recurrence, then you need to start counting then. You need to think carefully about when the counters should start and stop, then how patients move among states as the counter increases.

    If you want me to work on this model with you, we do offer short consulting engagements (likely 1 hour). Contact me at if you are interested in such a session.

    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post