MC | R Documentation |
Function MC
creates random Markov Chain from a transitions matrix. Function Rf
presents proportional summaries of discrete states from MC
. Function mat.pow
finds the exponential expansion of a matrix. Required for finding the expectations of a transition matrix.
MC(T, start, length)
Rf(res)
mat.pow(mat, pow)
T |
A symmetric transition matrix. |
start |
Starting state |
length |
Length of the chain to be created |
res |
Results from |
mat |
A symmetric matrix. |
pow |
Power the matrix is to be raised to. |
Ken Aho
A <- matrix(nrow = 4, ncol = 4, c(0.5, 0.5, 0, 0, 0.25, 0.5, 0.25,0, 0, 0.25, 0.5, 0.25,
0, 0, 0.5, 0.5), byrow = TRUE)
pi.0 <- c(1, 0, 0, 0)
Tp10 <- mat.pow(A, 10)
chain <- MC(A, 1, 100)
Rf(chain)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.