Creates ID variables for each row returned by tpmatrix(). This function is most conveniently used along with tpmatrix() to construct a tparams_transprobs() object.
tpmatrix_id(object, n_samples)
Arguments
object: An object of class expanded_hesim_data returned by expand.hesim_data(). This dataset must be expanded by treatment strategies, patients, and optionally time intervals.
n_samples: The number of parameters samples used for the probabilistic sensitivity analysis (PSA).
Returns
Returns a tpmatrix_id object that inherits from data.table with the same columns in object repeated n_samples times. That is, to facilitate creation of a tparams_transprobs() object, there is one row for each parameter sample, treatment strategy, patient, and optionally time interval.