Description Usage Arguments Value See Also Examples
View source: R/dmc_irreclass.R
dmc_irreclass
focuses on irreducible classes for
a given finite discrete-time Markov chain. This function tells you
how many irreducible classes in this M.C. and included states
of each class and it can also identify whether classes are
closed and period of each class.
1 | dmc_irreclass(MC, period = TRUE, whetherc = TRUE, r_or_t = TRUE)
|
MC |
is an object in class 'stat2003.d' |
period |
A logical scalar. If TRUE (the default)
|
whetherc |
A logical scalar. If TRUE (the default)
|
r_or_t |
A logical scalar. If TRUE (the default)
|
dmc_irreclass
returns a table about all irreducible classes.
stat2003.d-class
A class type of discrete-time finite
state space Markov chain in stat2003 package.
dmc_equi
returns the equilibrium
distribution for a discrete-time Markov chain.
dmc_inv
returns the invariant
distribution for a discrete-time Markov chain.
dmc_simu
simulates a discrete-time Markov chain by
returning one possible sequence and a states against steps plot.
dmc_tp
can calculate transient probabilities at a
specific step, and also can give a graph about transient probabilities
from step zero to that specific step.
dmc_period
returns the period of each state for
a given discrete-time Markov chain
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | m <- matrix(c(0, 1, 0, 0,
1, 0, 0, 0,
1/4, 1/4, 1/4,1/4,
0, 0, 1, 0), nr = 4, nc=4, byrow = TRUE)
A <- new("stat2003.d", p_start = c(1/2, 0, 0, 1/2), p = m,
statespace = c("0", "1", "C", "D") )
dmc_irreclass(A)
m <- matrix(c(1, 0, 0, 0, 0,
0, 1/2, 0, 1/2, 0,
1/2, 0, 0, 1/2, 0,
0, 1, 0, 0, 0,
1/3, 0, 1/3, 0, 1/3), nr = 5, nc=5, byrow = TRUE)
A <- new("stat2003.d", p_start = c(1/2, 0, 0, 1/2, 0), p = m,
statespace = c("A!", "B!", "C!", "D!", "E!") )
dmc_irreclass(A)
m <- matrix(c(0, 1, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0,
0, 1/3, 0, 2/3, 0, 0, 0,
0, 0, 0, 0, 2/3, 1/3, 0,
0, 2/3, 0, 1/3, 0, 0, 0,
0, 0, 0, 0, 0, 1/3, 2/3,
0, 0, 0, 0, 0, 1/4, 3/4), nr = 7, nc=7, byrow = TRUE)
A <- new("stat2003.d", p_start = c(0, 0, 0, 1, 0, 0, 0), p = m,
statespace = letters[1:7] )
dmc_irreclass(A)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.