Description Usage Arguments Value Note Author(s) References See Also Examples
View source: R/BioGeoBEARS_simulate_v1.R
This function simulates a biogeographical history, given a Q transition matrix, a cladogenesis model giving the relative probability of different range inheritance scenarios, a phylogeny, and a 0-based index value deciding the starting state (which could be randomly generated according to a prior distribution of states).
1 2 | simulate_biogeog_history(phy, Qmat, COO_probs_columnar,
index_Qmat_0based_of_starting_state)
|
phy |
An R |
Qmat |
A (square, dense) Q transition matrix. Using a sparse matrix would require writing another function. |
COO_probs_columnar |
A speciation/cladogenesis
transition matrix, in COO-like form, as produced by
|
index_Qmat_0based_of_starting_state |
An integer
index value, between 0 and |
simulated_states_by_node
A numeric matrix, giving
the 0-based index of the state at each node and tip in
the simulated history. Getting a more detailed history
would require a version of stochastic mapping
(Huelsenbeck et al. (2003), Bollback
(2005), Bollback (2006)), but customized for the
nonreversible and cladogenic aspects of biogeographical
range evolution models.
Go BEARS!
Nicholas J. Matzke [email protected]
http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster https://code.google.com/p/lagrange/
Huelsenbeck_etal_2003_stochastic_mapping
Bollback_2005
Bollback_2006_SIMMAP
Matzke_2012_IBS
rcpp_calc_anclikes_sp_COOweights_faster
1 | testval=1
|
Loading required package: rexpokit
Loading required package: cladoRcpp
Loading required package: ape
Loading required package: phylobase
Attaching package: 'phylobase'
The following object is masked from 'package:ape':
edges
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.