Red Door Analytics

RDA multistate

Multi-state survival modelling in Stata — transition probabilities, length of stay, and restricted mean times in state, on flexible parametric survival models. The mature predecessor of pendragon.

Stata packageWidely used in applied work & HTASucceeded by pendragon · still maintained
Stata package · the predecessor of pendragon

What multistate does

multistate is the original Stata toolkit for multi-state survival modelling, building directly on flexible parametric survival models. It has been widely used across applied biostatistics and health technology assessment.

Fit transition-specific hazards, then predict transition probabilities, length of stay, and restricted mean times in state — the quantities that drive multi-state cost-effectiveness models.

Its prediction engine is now re-architected on the current merlin engine as pendragon (R + Stata), which supersedes it. multistate stays available while pendragon reaches parity, and its data-prep tools are reused by pendragon unchanged.

Capabilities

A complete multi-state workflow in Stata

msset

Set up the data

Reshape survival data into the long, transition-specific form a multi-state model needs. Reused, unchanged, by pendragon.

predictms

Predict transitions

Transition probabilities, length of stay, and restricted mean time in state, with uncertainty via simulation. Re-architected on the current merlin as pendragon.

msaj

Aalen-Johansen

Non-parametric transition-probability estimates as a benchmark.

msboxes / graphms

Visualise

Draw the state structure and plot predicted transition probabilities over time.

Installation

Get started

Install from the package repository or from the SSC archive. For new projects, see pendragon, its successor on the current merlin engine.

* the current build, from the package repository
net install multistate, from(https://raw.githubusercontent.com/RedDoorAnalytics/multistate/main/)

* or from the SSC archive
ssc install multistate

The repository carries the newer build. The SSC copy is updated less often than the repository, so where the two differ the repository is ahead. net install and ssc install put the same package on your adopath; if you have installed from one and want the other, ado uninstall multistate first.

The merlin family

The predecessor of pendragon

multistate is the original Stata multi-state toolkit. Its prediction engine is now re-architected on the current merlin engine as pendragon (R + Stata), which supersedes it — while reusing multistate's data-prep tools (msset, msaj, msboxes, graphms) unchanged. merlin (frequentist) and morgana (Bayesian) fit the transition models.

Worked examples and tutorials for the family are in our Resources.

Try it in your browser: the multi-state & competing-risks explorer — build illness–death, competing-risks and progression models live in the browser.

Cite

Citing multistate

Cite the multistate paper — it is the reference for the package and the estimation approach.

@article{crowther2017,
  author  = {Crowther, M. J. and Lambert, P. C.},
  title   = {{Parametric multi-state survival models: flexible modelling allowing transition-specific distributions with application to estimating clinically useful measures of effect differences}},
  journal = {Statistics in Medicine},
  year    = {2017},
  volume  = {36},
  number  = {29},
  pages   = {4719--4742},
  doi     = {10.1002/sim.7448}
}

RIS and the full library are on the publications page.

Using multistate in applied or regulated work?

We build, maintain, and teach these methods. For support, training, a migration to pendragon, or a bespoke extension, get in touch with the team that wrote the package.

Get in touch Start a project