Individual-level continuous time state transition model
Individual-level continuous time state transition model
Simulate outcomes from an individual-level continuous time state transition model (CTSTM). The class supports "clock-reset" (i.e., semi-Markov), "clock-forward" (i.e., Markov), and mixtures of clock-reset and clock-forward multi-state models as described in IndivCtstmTrans.
Incerti and Jansen (2021). See Section 2.2 for a mathematical description of an individual-level CTSTM and Section 4.1 for an example in oncology.
See Also
The IndivCtstmTrans documentation describes the class for the transition model and the StateVals documentation describes the class for the cost and utility models. An IndivCtstmTrans
object is typically created using create_IndivCtstmTrans().
There are currently two relevant vignettes. vignette("mstate") shows how to parameterize IndivCtstmTrans objects in cases where patient-level data is available by fitting a multi-state models. vignette("markov-inhomogeneous-indiv")
shows how the time inhomogeneous Markov cohort model in vignette("markov-inhomogeneous-cohort") can be developed as an individual patient simulation; in doing so, it shows how IndivCtstm models can be used even without access to patient-level data.
Public fields
trans_model: The model for health state transitions. Must be an object of class IndivCtstmTrans.
utility_model: The model for health state utility. Must be an object of class StateVals.
cost_models: The models used to predict costs by health state. Must be a list of objects of class StateVals, where each element of the list represents a different cost category.
disprog_: An object of class disprog.
stateprobs_: An object of class stateprobs simulated using $sim_stateprobs().
qalys_: An object of class qalys simulated using $sim_qalys().
costs_: An object of class costs simulated using $sim_costs().
max_t: A scalar or vector denoting the length of time to simulate the model. If a vector, must be equal to the number of simulated patients.
max_age: A scalar or vector denoting the maximum age to simulate each patient until. If a vector, must be equal to the number of simulated patients.
progress: An integer, specifying the PSA iteration (i.e., sample) that should be printed every progress PSA iterations. For example, if progress = 2, then every second PSA iteration is printed. Default is NULL, in which case no output is printed.
Returns
An instance of self with simulated output stored in disprog_.
Method sim_stateprobs()
Simulate health state probabilities as a function of time using the simulation output stored in disprog.
Usage
IndivCtstm$sim_stateprobs(t)
Arguments
t: A numeric vector of times.
Returns
An instance of self with simulated output of class stateprobs
stored in stateprobs_.
Method sim_qalys()
Simulate quality-adjusted life-years (QALYs) as a function of disprog_ and utility_model.
Usage
IndivCtstm$sim_qalys(
dr = 0.03,
type = c("predict", "random"),
lys = TRUE,
by_patient = FALSE
)
Arguments
dr: Discount rate.
type: "predict" for mean values or "random" for random samples as in $sim() in StateVals.
lys: If TRUE, then life-years are simulated in addition to QALYs.
by_patient: If TRUE, then QALYs and/or costs are computed at the patient level. If FALSE, then they are averaged across patients by health state.
Returns
An instance of self with simulated output of class qalys stored in qalys_.
Method sim_costs()
Simulate costs as a function of disprog_ and cost_models.
Usage
IndivCtstm$sim_costs(
dr = 0.03,
type = c("predict", "random"),
by_patient = FALSE,
max_t = Inf
)
Arguments
dr: Discount rate.
type: "predict" for mean values or "random" for random samples as in $sim() in StateVals.
by_patient: If TRUE, then QALYs and/or costs are computed at the patient level. If FALSE, then they are averaged across patients by health state.
max_t: Maximum time duration to compute costs once a patient has entered a (new) health state. By default, equal to Inf, so that costs are computed over the entire duration that a patient is in a given health state. If time varies by each cost category, then time can also be passed as a numeric vector of length equal to the number of cost categories (e.g., c(1, 2, Inf, 3) for a model with four cost categories).
Returns
An instance of self with simulated output of class costs
stored in costs_.
Method summarize()
Summarize costs and QALYs so that cost-effectiveness analysis can be performed. See summarize_ce().
Usage
IndivCtstm$summarize(by_grp = FALSE)
Arguments
by_grp: If TRUE, then costs and QALYs are computed by subgroup. If FALSE, then costs and QALYs are aggregated across all patients (and subgroups).
Method clone()
The objects of this class are cloneable with this method.