rNijTRiT_ModRej {ctmcd} | R Documentation |
C++ Based Modified Rejection Sampling
Description
Function for generating initial and endpoint-conditioned Markov process sampling paths for a given discrete-time transition matrix
Usage
rNijTRiT_ModRej(tmabs, te, gm)
Arguments
tmabs |
matrix of absolute transition frequencies |
te |
time elapsed in transition process |
gm |
generator matrix |
Details
Function for the simulation of paths from an endpoint-conditioned Markov process. Returns number of transitions NijT and cumulative holding times RiT.
Value
endpoint-conditioned sampling path
Author(s)
Jon Fintzi, Marius Pfeuffer
References
J. Fintzi: R Package ECctmc, 2016.
A. Hobolth and E. A. Stone: Simulation from Endpoint-Conditioned, Continuous-Time Markov Chains on a Finite State Space, with Applications to Molecular Evolution. Annals of Applied Statistics 3(3):1204-1231, 2009
Examples
data(tm_abs)
## Initial guess for generator matrix (absorbing default state)
gm=matrix(1,8,8)
diag(gm)=0
diag(gm)=-rowSums(gm)
gm[8,]=0
rNijTRiT_ModRej(tm_abs,1,gm)
[Package ctmcd version 1.4.4 Index]