Lstates
), right branch
(Rstates
), and ancestral areas
(ancareas_txt_tmp
), construct the (text version)
of the row of transition probabilities. This means that
each nonzero cell gets a v for a vicariance event,
a y for a sympatric speciation/range-copying
event, a j for a founder-event/jump speciation
event, and an s for a sympatric-subset event.
make_relprob_matrix_bi(states_list = default_states_list(), split_ABC = FALSE, splitval = "", code_for_overlapping_subsets = NA, printwarn = 1)
TRUE
or FALSE
If
TRUE
then each state/range in the input geographic
ranges (states_list
) will be split on the argument
contained in split
.LAGRANGE
BioGeoBEARS defaults, and, if one is going to employ the
construct of discrete areas in the first place, overlaps
should probably be avoided. But this parameter will
allow experimentation. Here,
code_for_overlapping_subsets=NA
equals the
default, and any other value means that overlapping
vicariance events are included, with a number describing
the number of areas in the overlap. Users could then
manually convert this to a probability according to some
function.printwarn>0
(printwarn=1
by default), then print to screen a
message describing the size of the cladogenesis matrix.probmat
A matrix of strings, where each cell
contains the parameters describing the conditional
probability of that ancestor-->(Left descendant,Right
descendant) range inheritance scenario.
apply
in
other functions (e.g. ) in an attempt to speed up
calculation over rows. However, processing of text
formulas via apply
will never be fast
enough for large matrices; see
cladoRcpp
for optimized
functions. This text-based matrix later gets evaluated by other
functions to calculate the numerical probabilities.
I.e., if j=0 and the other forms of speciation have
weights equal to each other, this is the LAGRANGE
cladogenesis model.
NOTE: This function is veeeeeeery slow, even for only 3
areas (i.e. 2^3=8
geographic ranges). It is
mostly useful for illustration. See
cladoRcpp
for drastic
improvements in calculating cladogenesis models.
Matzke_2012_IBS
ReeSmith2008
size_species_matrix
,
make_spmat_row
testval=1
probmat = make_relprob_matrix_bi(states_list=list("_",
c("A"), c("B"), c("C"), c("A","B"), c("B","C"), c("A","C"),
c("A","B","C")), split_ABC=FALSE, splitval="",
code_for_overlapping_subsets=NA, printwarn=1)
probmat
Run the code above in your browser using DataLab