noofVisitsDist: return a joint pdf of the number of visits to the various...

View source: R/fittingFunctions.R

noofVisitsDistR Documentation

return a joint pdf of the number of visits to the various states of the DTMC

Description

This function would return a joint pdf of the number of visits to the various states of the DTMC during the first N steps.

Usage

noofVisitsDist(markovchain,N,state)

Arguments

markovchain

a markovchain-class object

N

no of steps

state

the initial state

Details

This function would return a joint pdf of the number of visits to the various states of the DTMC during the first N steps.

Value

a numeric vector depicting the above described probability density function.

Author(s)

Vandit Jain

Examples

transMatr<-matrix(c(0.4,0.6,.3,.7),nrow=2,byrow=TRUE)
simpleMc<-new("markovchain", states=c("a","b"),
             transitionMatrix=transMatr, 
             name="simpleMc")   
noofVisitsDist(simpleMc,5,"a")


markovchain documentation built on Sept. 24, 2023, 5:06 p.m.