Description Usage Arguments Value Examples
Sample path from the distribution of an endpoint-conditioned CTMC.
1 2 | sample_path(a, b, t0, t1, Q, method = "mr", npaths = 1, eigen_vals = NULL,
eigen_vecs = NULL, inverse_vecs = NULL, P = NULL)
|
a, b |
States at the left and right endpoints of the interval, given as row numbers of the CTMC rate matrix |
t0, t1 |
Times for the left and right endpoints of the interval. |
Q |
CTMC rate matrix. |
method |
Either "mr" corresponding to modified rejection sampling, or "unif" for uniformization. |
npaths |
optional argument for the number of sample paths to simulate. |
eigen_vals |
optional vector of eigen values of Q (assumes all eigen values are real). |
eigen_vecs |
optional matrix of eigen vectors of Q. |
inverse_vecs |
optional inverse of the eigen vector matrix. |
P |
optional transition probability matrix over the interval |
sample_path returns either a matrix with a sample path or a list of matrices of sample paths.
1 | sample_path(1, 2, 0, 5, matrix(c(-0.49, 0.49, 0.51, -0.51), nrow = 2, byrow = TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.