View source: R/phase_type_to_network.R
phase_type_to_network | R Documentation |
This function converts a phase-type distribution into an igraph graph object.
phase_type_to_network(phase_type, t = NULL)
phase_type |
an object of class |
t |
NULL or numeric. Sampling time for the continuous phase-type distribution. |
An igraph graph object of the phase-type distribution.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.