Description Usage Arguments Examples
mean method for cont_phase_type
mean method for disc_phase_type
mean method for mult_cont_phase_type
mean method for mult_disc_phase_type
1 2 3 4 5 6 7 8 9 10 11 12 13 |
x |
a |
... |
other arguments passed to methods |
v |
NULL, integer or vector. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # For univariate continuous phase-type distributions
ph1 <- PH(matrix(c(-3, 0, 0, 1, -2, 0, 0, 1, -1), ncol = 3), c(0.25,0.25,0.5))
mean(ph1)
# For multivariate continuous phase-type distributions
subintensity_matrix <- matrix(c(-3, 0, 0,
2, -2, 0,
0, 1, -1), nrow = 3, ncol = 3)
reward_matrix = matrix(sample(seq(0, 10), 6), nrow = 3, ncol = 2)
ph2 <- MPH(subintensity_matrix, reward_mat = reward_matrix)
## Mean for both states in the reward matrix
mean(ph2)
## Mean for the first state in the reward matrix
mean(ph2, 1)
## Mean for the second state in the reward matrix
mean(ph2, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.