View source: R/tabular_input.R
create_matrix_from_tabular | R Documentation |
Transforms tabular input defining a transition matrix
into an heemod
object.
create_matrix_from_tabular(trans_probs, state_names, df_env = globalenv())
trans_probs |
Result for one model of
|
state_names |
The names of the states used in the transition matrix. |
df_env |
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.
A transition matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.