transitionProbability | R Documentation |
This is a convenience function to get transition probabilities.
transitionProbability(object, t0, t1)
## S4 method for signature 'markovchain'
transitionProbability(object, t0, t1)
object |
A |
t0 |
Initial state. |
t1 |
Subsequent state. |
Numeric Vector
Giorgio Spedicato
A First Course in Probability (8th Edition), Sheldon Ross, Prentice Hall 2010
markovchain
statesNames <- c("a", "b", "c")
markovB <- new("markovchain", states = statesNames, transitionMatrix =
matrix(c(0.2, 0.5, 0.3, 0, 1, 0, 0.1, 0.8, 0.1), nrow = 3,
byrow = TRUE, dimnames=list(statesNames,statesNames)),
name = "A markovchain Object"
)
transitionProbability(markovB,"b", "c")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.