Description Usage Arguments Details Value Author(s) References Examples

View source: R/ctmcProbabilistic.R

This function returns the probability of every state at time t under different conditions

1 | ```
probabilityatT(C,t,x0,useRCpp)
``` |

`C` |
A CTMC S4 object |

`t` |
final time t |

`x0` |
initial state |

`useRCpp` |
logical whether to use RCpp implementation |

The initial state is not mandatory, In case it is not provided,
function returns a matrix of transition function at time `t`

else it returns
vector of probaabilities of transition to different states if initial state was `x0`

returns a vector or a matrix in case `x0`

is provided or not respectively.

Vandit Jain

INTRODUCTION TO STOCHASTIC PROCESSES WITH R, ROBERT P. DOBROW, Wiley

1 2 3 4 5 6 | ```
states <- c("a","b","c","d")
byRow <- TRUE
gen <- matrix(data = c(-1, 1/2, 1/2, 0, 1/4, -1/2, 0, 1/4, 1/6, 0, -1/3, 1/6, 0, 0, 0, 0),
nrow = 4,byrow = byRow, dimnames = list(states,states))
ctmc <- new("ctmc",states = states, byrow = byRow, generator = gen, name = "testctmc")
probabilityatT(ctmc,1,useRCpp = TRUE)
``` |

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.