Learn R Programming

markovchain (version 0.9.5)

ctmc-class: Continuous time Markov Chains class

Description

The S4 class that describes ctmc (continuous time Markov chain) objects.

Arguments

states

Name of the states. Must be the same of colnames and rownames of the generator matrix

byrow

TRUE or FALSE. Indicates whether the given matrix is stochastic by rows or by columns

generator

Square generator matrix

name

Optional character name of the Markov chain

Methods

dim

signature(x = "ctmc"): method to get the size

initialize

signature(.Object = "ctmc"): initialize method

states

signature(object = "ctmc"): states method.

steadyStates

signature(object = "ctmc"): method to get the steady state vector.

plot

signature(x = "ctmc", y = "missing"): plot method for ctmc objects

References

Introduction to Stochastic Processes with Applications in the Biosciences (2013), David F. Anderson, University of Wisconsin at Madison. Sai Bhargav Yalamanchi, Giorgio Spedicato

See Also

generatorToTransitionMatrix,rctmc

Examples

Run this code
energyStates <- c("sigma", "sigma_star")
byRow <- TRUE
gen <- matrix(data = c(-3, 3,
                       1, -1), nrow = 2,
              byrow = byRow, dimnames = list(energyStates, energyStates))
molecularCTMC <- new("ctmc", states = energyStates, 
                     byrow = byRow, generator = gen, 
                     name = "Molecular Transition Model")
                     steadyStates(molecularCTMC)
if (FALSE) plot(molecularCTMC)

Run the code above in your browser using DataLab