0

I'm using rmarkovchain from library("markovchain").

In this function we have the option to specify time 0.

For example:

rmarkovchain(n = 10,                  #number of time moments eg. 10 days
             object = dtmcA, 
             t0 = "event0",           #here time 0
             include.t0 = TRUE,       #here time 0
             parallel = TRUE)      

However, I want to specify the first three days (in example time is in days) i.e. t0, t1, t2 as [event0,event0,event0].

In other words the first 3 days will be event0.

For this example there are a total of three potential events: event 0, event 1, event 2

And the transition matrix can be anything, for example:

   0   1  2
0 0.3 0.2 0.5
1 0.1 0.7 0.2 
2 0    0   1

Can this be done using rmarkovchain?

Thank you

GabrieleMartini
  • 1,665
  • 2
  • 19
  • 26

1 Answers1

0

Update:

I've found a few approaches reading the documentation and published literature, but the one which worked best for me was the noofVisitsDist function in the markovchain library.

Posting in case anyone else runs into a similar question.

Sincerely.