Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/1_ctmcProbabilisticSAI.R

The function generates random CTMC transitions as per the provided generator matrix.

1 |

`n` |
The number of samples to generate. |

`ctmc` |
The CTMC S4 object. |

`initDist` |
The initial distribution of states. |

`T` |
The time up to which the simulation runs (all transitions after time T are not returned). |

`include.T0` |
Flag to determine if start state is to be included. |

`out.type` |
"list" or "df" |

In order to use the T0 argument, set n to Inf.

Based on out.type, a list or a data frame is returned. The returned list has two elements - a character vector (states) and a numeric vector (indicating time of transitions). The data frame is similarly structured.

Sai Bhargav Yalamanchi

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

`generatorToTransitionMatrix`

,`ctmc-class`

1 2 3 4 5 6 7 8 9 10 11 12 | ```
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")
statesDist <- c(0.8, 0.2)
rctmc(n = Inf, ctmc = molecularCTMC, T = 1)
rctmc(n = 5, ctmc = molecularCTMC, initDist = statesDist, include.T0 = FALSE)
``` |

```
Package: markovchain
Version: 0.6.9.11
Date: 2018-07-01
BugReport: http://github.com/spedygiorgio/markovchain/issues
[[1]]
[1] "sigma" "sigma_star" "sigma" "sigma_star"
[[2]]
[1] 0.0000000 0.6768946 0.7433952 0.9947883
[[1]]
[1] "sigma_star" "sigma" "sigma_star" "sigma" "sigma_star"
[[2]]
[1] 0.3643719 0.6727247 1.8528833 2.1364640 2.2887041
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.