Transforms tabular input defining a transition matrix
into an heemod
object.
create_matrix_from_tabular(trans_probs, state_names, df_env = globalenv())
A transition matrix.
Result for one model of
parse_multi_spec()
.
The names of the states used in the transition matrix.
An environment containing external data.
The data frame trans_probs
should have columns
from
, to
, and prob
, where
prob
is the probability of a transition from the
from
state to the to
state. Prob can be
defined in terms of parameters, just as when using
define_transition
at the keyboard. Probabilities of 0
need not be specified - they will be automatically
inserted.
All state names must be used in the from
column of
the transition matrix (otherwise you can just get rid of
the state). Absorbing states should have a transition
from and to themselves with probability 1.