tpmatrix() both defines and evaluates a transition probability matrix in which
elements are expressions. It can be used within define_tparams() to
create a transition probability matrix or directly to create a tparams_transprobs()
object. These are, in turn, ultimately used to create a CohortDtstmTrans object
for simulating health state transitions.
Usage
tpmatrix(...)
Arguments
...
Named values of expressions defining elements of the matrix. See
"Details" and the example below.
Value
Returns a tpmatrix object that inherits from data.table
where each column is an element of the transition probability matrix with
elements ordered rowwise.
Details
The matrix is filled rowwise, meaning that each row should sum to 1.
The complementary probability (equal to 1 minus the sum of the probabilities
of all other rows) can be conveniently referred to as C.