ctmc-class: Class '"ctmc"'

Description Objects from the Class Slots Methods Warning Note Author(s) References See Also Examples

Description

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

Objects from the Class

Objects can be created by calls of the form new("ctmc", states, byrow, generator, ...).

Slots

states:

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

byrow:

Binary flag.

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

Warning

Validation method is used to assess whether either columns or rows totals to zero. Rounding is used up to 5th decimal. If state names are not properly defined for a generator matrix, coercing to ctmc object leads to overriding states name with artificial "s1", "s2", ... sequence

Note

ctmc objects are written using S4 Classes.

Author(s)

Sai Bhargav Yalamanchi, Giorgio Spedicato

References

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

See Also

generatorToTransitionMatrix,rctmc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)
## Not run: plot(molecularCTMC)

Example output

Package:  markovchain
Version:  0.6.9.8-1
Date:     2017-08-15
BugReport: http://github.com/spedygiorgio/markovchain/issues

     sigma sigma_star
[1,]  0.25       0.75

markovchain documentation built on Aug. 24, 2018, 1:03 a.m.