FPTime | R Documentation |
This function uses the companion function multDTMC to simulate several Markov chains to determine the first passage time into each state, i.e. the first time (after the initial iteration) that a specified state is reached in the Markov Process. First Passage Time can be useful for both determining class properties as well as the stationary/invariant distribution for large Markov Chains in which explicit matrix inversion is not computationally tractable.
FPTime(state, nchains, tmat, io, n)
state |
State in which you want to find the first passage time. |
nchains |
Number of chains you wish to simulate. |
tmat |
Transition Matrix, must be a square matrix, rows must sum to 1. |
io |
Initial Distribution |
n |
Number of iterations to run for each Markov Chain. |
fp1 |
Vector of length(nchains) which gives first passage time into the specified state for each Markov Chain. |
Will Nicholson
DTMC
data(gr) data(id) FPTime(1,10,gr,id,10) # First passage time into first state on Gambler's ruin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.