simulate_markov_chain {oeli} | R Documentation |
Simulate Markov chain
Description
This function simulates a Markov chain.
Usage
simulate_markov_chain(Gamma, T, delta = oeli::stationary_distribution(Gamma))
Arguments
Gamma |
[ |
T |
[ |
delta |
[ The stationary distribution is used by default. |
Value
A numeric
vector of length T
with states.
See Also
Other simulation helpers:
Simulator
,
correlated_regressors()
,
ddirichlet_cpp()
,
dmvnorm_cpp()
,
dtnorm_cpp()
,
dwishart_cpp()
Examples
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)
[Package oeli version 0.7.4 Index]