Description Usage Arguments Value Examples
Take in the matrix of the states of synthetic population (created by syn_pop
function)
and calculate the transitions from one state to other state(s) using the transition rate(s).
1 | state_trans(origin, new.states, params, s.matrix)
|
origin |
A number which represents the column index |
new.states |
A numeric vector or a number which represents the column index |
params |
A numeric vector of similar length to |
s.matrix |
A state matrix created from |
A transition matrix of the same dimension as s.matrix
. -1 indicates that the individual has left
the corresponding state. +1 indicates that the individual has become the corresponding state.
1 2 3 | pop <- syn_pop(c(19,1,0,0))
state_trans(1,2,.1,pop)
state_trans(1,4,100,pop)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.