Learn R Programming

GUIgems (version 0.1)

graphHf: graphHf

Description

Plots the possible progression paths in the stochastic model based on the transition matrix. The endges in the graph exist, if there is a transition function between given two states.

Usage

graphHf(hfNames, statesNames = rownames(hfNames))

Arguments

hfNames
a matrix with names of hazard functions;
statesNames
a list of names of the states. By default rows names of HfNames

Value

ghf - a graph with statesNames as nodes. There are egdes between states, where the hazard function is not "impossible" nor "NULL"

Examples

Run this code

hfNames <- array(rep("Exponential", 36), dim = c(6,6))
hfNames[col(hfNames)<=row(hfNames)]<-"NULL"
hfNames[3,4:5] <-  rep("impossible",2)
graphHf(hfNames)

Run the code above in your browser using DataLab