*! version 1.0.0

Title

stms -- Transition-specific multi-state modelling

Syntax

stms (model1) [(model2)] [...]

where the syntax of modeli is

[indepvars] [if] [in] [, model_options]

depvar specifies the longitudinal continuous response variable.

model_options

Model
model(exponential) exponential survival model

model(weibull) Weibull survival model

model(gompertz) Gompertz survival model

model(llogistic) Gompertz survival model

model(lnormal) Gompertz survival model

model(ggamma) generalised gamma survival model

model(fpm) flexible parametric survival model

FPM options
fpm_opts additional options for use with model(fpm); see stpm2

Maximisation
constraints(cons_list) list of constraints

maximize_options control the maximization process; seldom used

Reporting
showcons list constraints in output

keepcons do not drop constraints used in ml routine

level(#) set confidence level; default is level(95)

You must msset and stset your data before using stms; see msset and [ST] stset.

See predictms for features available after estimation.

Description

stms fits joint transition-specific survival models, allowing each transition to have a different parametric model,
yet maximised jointly to enable sharing of covariate effects across transitions. The order of models corresponds to the
transition number from your transition matrix, used in msset.

stms is part of the multistate package by Michael Crowther and Paul Lambert. Further
details here: mjcrowther.co.uk/software/multistate

Example 1

This dataset contains information on 2982 patients with breast cancer. Baseline is defined as time of surgery, and patients can experience
relapse, relapse then death, or death with no relapse. Time of relapse is stored in rf, with event indicator rfi, and time of death
is stored in os, with event indicator osi.

Load example dataset:

use http://fmwww.bc.edu/repec/bocode/m/multistate_example

msset the data:

msset, id(pid) states(rfi osi) times(rf os)

Store the transition matrix:

mat tmat = r(transmatrix)

stset the data using the variables created by msset

stset _stop, enter(_start) failure(_status=1)

Fit transition-specific models for transitions 1, 2 and 3, :

stms (age sz2 sz3 nodes pr_1 hormon, model(fpm) df(3) scale(h)) ///

(age sz2 sz3 nodes pr_1 hormon, model(weib)) ///

(age sz2 sz3 nodes pr_1 hormon, model(fpm) df(3) scale(h))

Calculate transition probabilities for a patient with age 50:

predictms, transmatrix(tmat) at1(age 50)

We could constrain the effect of age to be the same for transitions 1 and 3 as follows:

constraint 1 [xb1][age]=[xb3][age]

stms (age sz2 sz3 nodes pr_1 hormon, model(fpm) df(3) scale(h)) ///

(age sz2 sz3 nodes pr_1 hormon, model(weib)) ///

(age sz2 sz3 nodes pr_1 hormon, model(fpm) df(3) scale(h)) ///

, constraint(1)

Author

Michael J. Crowther

Department of Health Sciences

University of Leicester

E-mail: michael.crowther@le.ac.uk

Please report any errors you may find.

References

Crowther MJ, Lambert PC. Parametric multi-state survival models: flexible modelling allowing transition-specific distributions with
application to estimating clinically useful measures of effect differences. Statistics in Medicine 2017;36(29):4719-4742.