conditionalDistribution: 'conditionalDistribution' of a Markov Chain

Description Usage Arguments Value Author(s) References See Also Examples

Description

It extracts the conditional distribution of the subsequent state, given current state.

Usage

1

Arguments

object

A markovchain object.

state

Subsequent state.

Value

A named probability vector

Author(s)

Giorgio Spedicato, Deepak Yadav

References

A First Course in Probability (8th Edition), Sheldon Ross, Prentice Hall 2010

See Also

markovchain

Examples

1
2
3
4
5
6
7
# define a markov chain
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)))
                      
conditionalDistribution(markovB, "b")                       

spedygiorgio/markovchain documentation built on Sept. 14, 2019, 1:08 a.m.