View source: R/probabilistic.R
firstPassage | R Documentation |
This function compute the first passage probability in states
firstPassage(object, state, n)
object |
A |
state |
Initial state |
n |
Number of rows on which compute the distribution |
Based on Feres' Matlab listings
A matrix of size 1:n x number of states showing the probability of the first time of passage in states to be exactly the number in the row.
Giorgio Spedicato
Renaldo Feres, Notes for Math 450 Matlab listings for Markov chains
conditionalDistribution
simpleMc <- new("markovchain", states = c("a", "b"),
transitionMatrix = matrix(c(0.4, 0.6, .3, .7),
nrow = 2, byrow = TRUE))
firstPassage(simpleMc, "b", 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.