View source: R/simulate_markov_chain.R
| simulate_markov_chain | R Documentation |
This function simulates a Markov chain.
simulate_markov_chain(Gamma, T, delta = oeli::stationary_distribution(Gamma))
Gamma |
[ |
T |
[ |
delta |
[ The stationary distribution is used by default. |
A numeric vector of length T with states.
Other simulation helpers:
Simulator,
correlated_regressors(),
ddirichlet_cpp(),
dmixnorm_cpp(),
dmvnorm_cpp(),
dtnorm_cpp(),
dwishart_cpp(),
gaussian_tv()
Gamma <- matrix(c(0.8, 0.2, 0.3, 0.7), byrow = TRUE, nrow = 2)
delta <- c(0.6, 0.4)
simulate_markov_chain(Gamma = Gamma, T = 20, delta = delta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.