dmc_simu: Simulation of a discrete-time finite statespace Markov chain

Description Usage Arguments Value See Also Examples

Description

dmc_simu simulates a discrete-time finite statespace Markov chain by returning a possible sequence and a states against steps plot.

Usage

1
dmc_simu(MC, time, graph = TRUE)

Arguments

MC

is an object in class 'stat2003.d'

time

an interger, total number of steps that the process will run in this simulation.

graph

Logical. If True the function will also return a states against steps plot, otherwise the function will not return the plot

Value

dmc_simu returns a possible sequence for simulation of a discrete-time Markov chain and a states against steps plot.

See Also

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_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_irreclass focuses on irreducible classes for a given discrete-time Markov chain.

dmc_period returns the period of each state for a given discrete-time Markov chain.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
m <- matrix(c(1, 0, 0, 0, 0, 0,
              1/4, 0, 3/4, 0, 0, 0,
              0, 1/2, 0, 1/2, 0, 0,
              0, 0, 1/2, 0, 1/3, 1/6,
              0, 0, 0, 0, 1/4, 3/4,
              0, 0, 0, 0, 1/3, 2/3), nr = 6, nc=6, byrow = TRUE)

A <- new("stat2003.d", p_start = c(1/6, 1/6, 1/6, 1/6, 1/6, 1/6), p = m,
         statespace = letters[1 : 6] )

dmc_simu(A, 100, graph = TRUE)

paulnorthrop/stat2003 documentation built on May 24, 2019, 10:31 p.m.