View source: R/states_define.R
define_state_transition_list | R Documentation |
Define the state transitions of a Markov model by combining
state_transition
objects.
define_state_transition_list(...)
define_state_transition_list_(.dots)
... |
expressions defining model state transtiions. |
.dots |
List of states, only used by
|
.OBJECT |
An |
All states transitions should have the same value names as model states.
The modify
function can modify existing state
transitions or add new ones.
An object of class uneval_state_list
(a
list of state
objects).
## Not run:
s1 <- define_state_transition(from = "A", cost = 1, util = 1)
s2 <- define_state_transition(from = "B", cost = 3, util = .4)
states_trans_mod <- define_state_transition_list(
s1,
s2
)
states_mod
s1_bis <- define_state_transition_list(from = "A", cost = 0, util = 1)
s3 <- define_state(to = "A", cost = 10, util = .1)
modify(
states_mod,
s1_bis,
s3
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.