Description Usage Arguments Details Value
Sample from the stationary distribution of a discrete Markov chain using the Coupling From the Past algorithm.
1 2 |
k |
number of states of the Markov chain |
roll.fun |
user defined function that rolls the original die. Must have as first input the size of the returned sample. Additional inputs can be passed. |
update.fun |
update function of the Markov chain. See the method |
monotonic |
if |
min |
minimum state used in the monotonic CFTP. Ignored if |
max |
maximum state used in the monotonic CFTP. Ignored if |
verbose |
if |
double_time |
if |
The function is designed to sample from a fine and connected ladder using
rolls of a given die and uniform random variables. It requires an update function to be
defined as well as a function to roll the original die. It is mostly used internally by
the Ladder
class.
If verbose=FALSE
, returns a state sampled from the stationary distribution.
If verbose=TRUE
, returns a list where the first element is a state from the stationary
distribution and the second element are the time steps required by the algorithm to finish.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.