Description Usage Arguments Details Value Author(s) Examples
Simulates discrete markov chain with state space
1 | mc.simulation(pijdef, type, N, initial.state,...)
|
pijdef |
The transition probabilities, either in matrix form or a function For now only matrix form, until the infinite case is incorporated |
type |
Type of markov chain, either 'discrete' or 'continuous'. |
N |
Number of steps of the markov chain being simulated |
initial.state |
Initial state that the chain will start from |
... |
Additional argument for continuous markov chain type. |
This function will simulate discrete markov chain for a given transition probability matrix, if the initial state is not specified then it will be randomly generated from the state space.
pijdef |
The original transition matrix |
simulated.states |
N Simulated states based on the transition matrix |
Teresa Filshtein <teresa.filshtein@gmail.com>, Ozan Sonmez <osonmez@ucdavis.edu>, Rex Cheung <rccheung@ucdavis.edu>, and Norm Matloff <matloff@cs.ucdavis.edu>
1 2 | t.matrix = t(matrix(c(0.1,0.2,0.7,0.4,0.5,0.1,0,0.4,0.6),3,3))
mc.simulation(t.matrix, "discrete", 100, 1)$simulated.states
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.