phase_type_to_network {PhaseTypeR} | R Documentation |
Phase-type distribution to network
Description
This function converts a phase-type distribution into an igraph graph object.
Usage
phase_type_to_network(phase_type, t = NULL)
Arguments
phase_type |
an object of class |
t |
NULL or numeric. Sampling time for the continuous phase-type distribution. |
Value
An igraph graph object of the phase-type distribution.
Examples
## Not run:
cont_phase_type <- matrix(c(-3, 0, 1,
2, -3, 1,
1, 1, -2), ncol = 3)
Y <- PH(cont_phase_type)
Y_network <- phase_type_to_network(Y)
set.seed(28)
plot(Y_network, layout = layout_with_fr(Y_network, weights = rep(1, length(E(Y_network)))))
## End(Not run)
[Package PhaseTypeR version 1.0.4 Index]