check.accessible: Verify if a state j is reachable from state i

Description Usage Arguments Value References Examples

View source: R/rewriteFunc.R

Description

This function verifies if a state is reachable from another, i.e., if exists a path that leads to state j leaving from state i with positive probability

Usage

1
check.accessible(mc, from, to)

Arguments

mc

mc class object

from

character of the state name

to

character of the state name

Value

a boolean value

References

markovchain CRAN package

Examples

1
2
3
4
statesNames=c("a","b","c")
markovB<-mc.create(matrix(c(0.2,0.5,0.3,0,0.2,0.8,0.1,0.8,0.1),nrow=3, byrow=TRUE, 
	dimnames=list(statesNames,statesNames)), discrete = TRUE, infinite = FALSE)
check.accessible(markovB,"a","c")

qiwei-li/fidcMC documentation built on May 26, 2019, 11:35 a.m.