Description Usage Arguments Details Value Examples
View source: R/build_historical_assoc_mat.R
Reconstruct historical association matrix
1 2 3 | build_historical_association_matrix(t, tr_pair_obj)
get_assoc(t, tr_pair_obj)
|
t |
The time of interest |
tr_pair_obj |
The tree pair object from 'sim_cophyBD' |
Given a time and a tree pair object produced by the 'sim_cophyBD' object will produce the association matrix at that time point for the tree object. USER WARNING: this is still in development, and likely will not work all the time.
Matrix of the associations at given time
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | host_mu <- 1.0 # death rate
host_lambda <- 2.0 # birth rate
numb_replicates <- 1
time <- 1.0
symb_mu <- 0.2
symb_lambda <- 0.4
host_shift_rate <- 0.0
cosp_rate <- 2.0
cophylo_pair <- sim_cophyBD(hbr = host_lambda,
hdr = host_mu,
cosp_rate = cosp_rate,
host_exp_rate = host_shift_rate,
sdr = symb_mu,
sbr = symb_lambda,
numbsim = numb_replicates,
time_to_sim = time)
time <- 1.0
assoc_mat_at_t <- get_assoc(t=time, tr_pair_obj = cophylo_pair[[1]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.