ctmc.sim: Simulation of a CTMC path.

Description Usage Arguments Value See Also

Description

Generates a realization of a continuous-time Markov chain (CTMC).

Usage

1
ctmc.sim(t, rate.mat, states = c("a","c","g","t"), init.state)

Arguments

t

A nonnegative numeric scalar representing the CTMC time interval length.

rate.mat

A CTMC rate matrix.

states

A character or integer vector denoting the CTMC state space. Defaults to the set of DNA nucleotides c("a","c","g","t").

init.state

The initial state of the CTMC. This state must be an element of states.

Value

A data frame with two named columns "state" and "time". The "state" column stores the observed states of the CTMC path and the "time" column specifies the times at which each of the observed states is entered.

See Also

moments.ctmcjumps


dunleavy005/phylomoments documentation built on May 15, 2019, 5:59 p.m.