View source: R/posteriorpredictive_functions.R
draw_nevents_conditional | R Documentation |
Draw the number of events conditioning on the start and end state given the underlying CTMC (implementing equation 2.9 from Hobolth and Stone, 2009)
draw_nevents_conditional(node_ages, Q, Q_ages = NULL, node_state_indices, Pab)
node_ages |
A vector containing the start (first element) and end ages (second element) of this duration |
Q |
An instantaneous-rate matrix (or a list of matrices for a piecewise constant discrete-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. |
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 |
Pab |
The transition probability between the start and end states |
An integer that is the sampled number of events
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.