rmph | R Documentation |
Generates a sample of size n
from a MPH* distribution with parameters
alpha
, S
and R
.
rmph(n, alpha, S, R)
n |
Sample size. |
alpha |
Initial probabilities. |
S |
Sub-intensity matrix. |
R |
Reward matrix. |
The simulated sample.
alpha <- c(0.5, 0.3, 0.2)
S <- matrix(c(c(-1, 0, 0), c(1, -2, 0), c(0, 1, -5)), nrow = 3, ncol = 3)
R <- matrix(c(c(1, 0, 0.8), c(0, 1, 0.2)), nrow = 3, ncol = 2)
n <- 10
rmph(n, alpha, S, R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.