Create a list containing predicted transition probabilities at discrete times.
Since the transition probabilities have presumably
already been predicted based on covariate values, no input data is required for
simulation. The class can be instantiated from either an
data.frame, or a
tparams_transprobs(object, ...) # S3 method for array tparams_transprobs( object, tpmatrix_id = NULL, times = NULL, grp_id = NULL, patient_wt = NULL, ... ) # S3 method for data.table tparams_transprobs(object, ...) # S3 method for data.frame tparams_transprobs(object, ...) # S3 method for tpmatrix tparams_transprobs(object, tpmatrix_id, ...)
An object of the appropriate class.
Further arguments passed to or from other methods. Currently unused.
An optional numeric vector of distinct times to pass to time_intervals representing time intervals indexed by the 4th dimension of the array. May either be the start or the end of intervals. This argument is not required if there is only one time interval.
An optional numeric vector of integers denoting the subgroups. Must be the same length as the 3rd dimension of the array.
An optional numeric vector denoting the weight to apply to each patient within a subgroup. Must be the same length as the 3rd dimension of the array.
An object of class
which is a list containing
value and relevant ID attributes. The element
value is an
array of predicted transition probability matrices from the probability
distribution of the underlying statistical model. Each matrix in
value is a prediction for a
patient_id, and optionally
The format of
object depends on its class:
Either a 3D or a 6D array is possible.
If a 3D array, then each slice is a
square transition probability matrix. In this case
tpmatrix_id is required and each matrix slice corresponds to the same
numbered row in
tpmatrix_id. The number of matrix slices must equal the number
of rows in
If a 6D array, then the dimensions of the array should be indexed as follows:
sample), 2nd (
strategy_id), 3rd (
time_id), 5th (rows of transition matrix), and
6th (columns of transition matrix). In other words, an index of
[s, k, i, t] represents the transition matrix for the
kth treatment strategy,
ith patient, and
Must contain the following:
ID columns for the parameter sample (
treatment strategy (
strategy_id), and patient (
If the number of time intervals is greater than 1 it must also contain the
time_start denoting the starting time of a time interval. A column
patient_wt may also be used to denote the weight to apply to each
Columns for each element of the transition probability matrix.
They should be prefixed with "prob_" and ordered rowwise.
For example, the following columns would be used for a 2x2 transition
prob_1 (1st row, 1st column),
prob_2 (1st row, 2nd column),
prob_3 (2nd row, 1st column), and
prob_4 (2nd row, 2nd column).
An object of class
tparams_transprobs object is also instantiated when creating a
cohort discrete time state transition model using