Description Usage Arguments Details Value Source Examples
View source: R/markov_transitions.R
Generate a
1 | make_markov_series(n, tm, burnin = NULL, ...)
|
n |
an integer representing the length of the series |
tm |
a Transition Matrix that describes the transition matrix |
burnin |
integer, number of values to simulate before drawing from the series |
... |
additional arguments to apss to |
A Transition Matrix is a 2x2 matrix where:
Element 1, 1 is the probability of moving to state 0 conditional on being in state 0
Element 2, 1 is the probability of moving to state 0 conditional on being in state 1
Element 1, 2 is the probability of moving to state 1 conditional on being in state 0
Element 2, 2 is the probability of moving to state 1 conditional on being in state 1
a vector of length n
with a random series of 0 and 1 generated
from the tm
1 | make_markov_series(10, matrix(c(0.6,0.4,0.9,0.1), nrow=2, byrow=TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.