Description of the class disc_phase_type
, which represents discrete phase-type
distributions.
disc_phase_type(subint_mat = NULL, init_probs = NULL)
subint_mat | matrix or |
---|---|
init_probs | vector, a one-row matrix or |
disc_phase_type
is the generator function for the discrete phase-type distribution class
of the same name, which inherits from list
. The class is generated by supplying a sub-intensity
matrix and an optional initial probability vector. If the initial probabilities are not specified,
then a they are automatically generated as the first state having a probability of 1 and the rest
a probability of 0.
subintensity_matrix = matrix(c(0.4, 0, 0, 0.24, 0.4, 0, 0.12, 0.2, 0.5), ncol = 3) disc_phase_type(subintensity_matrix)#> Warning: The initial probability vector is automatically generated.#> $subint_mat #> [,1] [,2] [,3] #> [1,] 0.4 0.24 0.12 #> [2,] 0.0 0.40 0.20 #> [3,] 0.0 0.00 0.50 #> #> $init_probs #> [,1] [,2] [,3] #> [1,] 1 0 0 #> #> $defect #> [1] 0 #> #> attr(,"class") #> [1] "disc_phase_type"#--- subintensity_matrix = matrix(c(0.4, 0, 0, 0.24, 0.4, 0, 0.12, 0.2, 0.5), ncol = 3) initial_probabilities = c(0.9, 0.1, 0) disc_phase_type(subintensity_matrix, initial_probabilities)#> $subint_mat #> [,1] [,2] [,3] #> [1,] 0.4 0.24 0.12 #> [2,] 0.0 0.40 0.20 #> [3,] 0.0 0.00 0.50 #> #> $init_probs #> [,1] [,2] [,3] #> [1,] 0.9 0.1 0 #> #> $defect #> [1] 0 #> #> attr(,"class") #> [1] "disc_phase_type"