hesim-dev / hesim

Health economic simulation modeling and decision analysis
https://hesim-dev.github.io/hesim/
62 stars 17 forks source link

Directly specifying transition probabilities in iCTSTM #8

Closed aheff closed 4 years ago

aheff commented 4 years ago

In the intro.Rmd vignette is it possible to directly specify transition probabilities between states (and death transitions) rather than having to fit real data as per lines 95 and thereabouts.

Especially for model development, it would be great to be able to just explicitly specify transition probabilities (perhaps with distributions to incorporate uncertainty) and have these go into the model definition in line 172. These could be defined from state to state, and could incorporate age and gender (e.g. specifying transition A -> B as 0.2 under age of 20, 0.4 age 20-60 and 0.6 age 60+ - simple things like that to allow quick model construction).

This may be an insultingly basic question - but I've spent a few hours hacking around trying to manually enter a transition matrix directly but to no avail. Any help on this problem greatly received as this looks like a great off-the-shelf STM package if I could just get my head around how to setup the model.

dincerti commented 4 years ago

The CohortDtstm model now available in the development version of the package does exactly this (and is the example in the "getting started" vignette).

Currently a iCTSTM can only be parameterized from the parameters of a multi-state model using a params_surv object, a params_surv_list object, or directly from a fitted model (i.e., a flexsurvreg object). In other words you need the underlying regression coefficients of the multi-state or survival model used for parametrization. The basic difference from the standard Markov cohort model is that you are specifying the transition intensities rather than transition probabilities.

That being said, we do have plans in a future version to allow users to do individual patient simulation with a iCTSTM model by entering a transition probability matrix.

Once v0.3.0 is released the documentation will hopefully be more clear spelling all this out.

aheff commented 4 years ago

Thanks for the response. I will focus on the cohort STM part of the package for now.