Simulate values (i.e., utility or costs) associated with health states in a state transition or partitioned survival model.
The method used to simulate costs and
quality-adjusted life-years (QALYs) as a function of state values.
wlos, then costs and QALYs are
simulated by weighting state values by the length of stay in a health
starting, then state values represent a one-time value
that occurs when a patient enters a health state. When
used in a cohort model, the state values only accrue at time 0;
in contrast, in an individual-level model, state values
accrue each time a patient enters a new state and are discounted based on
time of entrance into that state.
FALSE then time intervals are based on time since
the start of the simulation. If
TRUE, then time intervals reset each
time a patient enters a new health state. This is relevant if, for example,
costs vary over time within health states. Only used if
method = wlos.
Create a new
StateVals$new( params, input_data = NULL, method = c("wlos", "starting"), time_reset = FALSE )
Simulate state values with either predicted means or random samples by
treatment strategy, patient, health state, and time
StateVals$sim(t, type = c("predict", "random"))
A numeric vector of times.
"predict" for mean values or
"random" for random samples.
data.table of simulated state values with columns for
Input validation for class. Checks that fields are the correct type.
The objects of this class are cloneable with this method.
StateVals$clone(deep = FALSE)
Whether to make a deep clone.