Learn R Programming

BioGeoBEARS (version 0.2.1)

given_a_starting_state_simulate_split: Given the state just below a node, simulate the states after speciation

Description

This function simulates a biogeographical history during a speciation/cladogenesis range inheritance event, given a cladogenesis probability transition matrix and a starting state.

Usage

given_a_starting_state_simulate_split(index_Qmat_0based_of_starting_state = 1, COO_probs_columnar, numstates)

Arguments

index_Qmat_0based_of_starting_state
An integer index value, between 0 and (numstates-1), which specifies what state is the starting point for the branch.
COO_probs_columnar
A speciation/cladogenesis transition matrix, in COO-like form, as produced by rcpp_calc_anclikes_sp_COOweights_faster.
numstates
The number of states/geographic ranges.

Value

split_desc 0-based indices of the descendant states in the two daughters.

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster https://code.google.com/p/lagrange/

Matzke_2012_IBS

Matzke_Maguire_2011_SVP

See Also

rcpp_calc_anclikes_sp_COOweights_faster, rcpp_calc_rowsums_for_COOweights_columnar

Examples

Run this code
testval=1

Run the code above in your browser using DataLab