plot.Markov {cfda}R Documentation

Plot the transition graph

Description

Plot the transition graph between the different states. A node corresponds to a state with the mean time spent in this state. Each arrow represents the probability of transition between states.

Usage

## S3 method for class 'Markov'
plot(x, ...)

Arguments

x

output of estimate_Markov function

...

parameters of plotmat function from diagram package (see details).

Details

Some useful extra parameters:

Value

No return value, called for side effects

Author(s)

Cristian Preda

Examples

# Simulate the Jukes-Cantor model of nucleotide replacement
K <- 4
PJK <- matrix(1 / 3, nrow = K, ncol = K) - diag(rep(1 / 3, K))
lambda_PJK <- c(1, 1, 1, 1)
d_JK <- generate_Markov(n = 100, K = K, P = PJK, lambda = lambda_PJK, Tmax = 10)

# estimation
mark <- estimate_Markov(d_JK)

# transition graph
plot(mark)

[Package cfda version 0.11.0 Index]