View source: R/posteriorpredictive_functions.R
sim_history_piece_conditional | R Documentation |
Simulate history of discrete-character changes over a duration of time (i.e., a piece of a branch that the character evolved under a constant model) conditioning on the start and end states (implementing algorithm #5 of Hobolth and Stone, 2009)
sim_history_piece_conditional( node_ages, Q, Q_ages = NULL, P = NULL, node_state_indices )
node_ages |
Start and end ages of this duration |
Q |
An instantaneous-rate matrix (or a list of matrices for a piecewise constant geographic model) characterizes the CTMC |
Q_ages |
A vector containing boundaries of time intervals for a piecewise constant geographic model (NULL means a constant model); the length of this vector should be one shorter than the Q-matrix list, sorted from oldest to youngest. |
P |
The transition probability matrix computed from the Q matrix (if not provided then it will be computed in this function) |
node_state_indices |
State indices (i.e., the indices to use to fecth the states from the states vector) pf the start and end nodes |
A list containing two vectors, one for the end state of each event over this duration and other for the age of each event
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.