symbolic_to_P_matrix
, but for a
speciation/cladogenesis matrix.
symbolic_to_relprob_matrix_sp(spmat, cellsplit = "\+", mergesym = "*", ys = 1, j = 0, v = 1, maxent_constraint_01 = 1e-04, maxent_constraint_01v = 1e-04, max_numareas = 6, ...)
s=1
mimics LAGRANGE model.v=1
mimics LAGRANGE model.j=0
mimics
LAGRANGE model.maxent_constraint_01=0.0001
, then
the smaller descendant has a range size of 1 with
probability 1 (i.e., the LAGRANGE
default). If
maxent_constraint_01=0.5
, then all range sizes are
equally weighted. If maxent_constraint_01=1
, then
the largest possible smaller descendant gets probability
1. The reference to "maxent" derives from the fact that
the maxent probability distribution on a multistate,
ordered, discrete variable -- e.g. a die roll -- can be
calculated given just the mean value. Here, the
maxent_constraint_01
parameter is multiplied by
the (maximum rangesize + 1). Thus, when
maxent_constraint_01=0.5
, if there are 6 possible
states, then the parameter becomes 3.5, which sets equal
probabilities of all possible descendant ranges sizes,
when range size can range from 1 to 6.maxent_constraint_01
, but just for descendants of
vicariant events.relative_probabilities_of_subsets
and
relative_probabilities_of_vicariants
, and
thence to strsplit
.cellval
The output cell value.
This function uses
symbolic_cell_to_relprob_cell_sp
in an
sapply
call. It still will not be
very fast compared to the calculations in
cladoRcpp
, but can be useful for
demonstrative purposes.
Matzke_2012_IBS
ReeSmith2008
symbolic_cell_to_relprob_cell_sp
,
make_relprob_matrix_de
testval=1
# Generate the text version of the speciation/cladogenesis probability matrix
# (actually a relative weights matrix
# until the rows are normalized so that each sums to 1).
spmat = 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)
spmat
# Look at the conditional probabilities generated by a variety of models
spPmat = symbolic_to_relprob_matrix_sp(spmat=spmat, cellsplit="\\\\+", mergesym="*",
ys=1, j=0, v=1, maxent_constraint_01=0.0001, maxent_constraint_01v=0.0001,
max_numareas=3)
spPmat = adf(spPmat); names(spPmat) = names(spmat); rownames(spPmat) = rownames(spmat)
spPmat
spPmat = symbolic_to_relprob_matrix_sp(spmat=spmat, cellsplit="\\\\+",
mergesym="*", ys=0.5, j=0, v=0.5, maxent_constraint_01=0.0001,
maxent_constraint_01v=0.0001, max_numareas=3)
spPmat = adf(spPmat); names(spPmat) = names(spmat); rownames(spPmat) = rownames(spmat)
spPmat
spPmat = symbolic_to_relprob_matrix_sp(spmat=spmat, cellsplit="\\\\+",
mergesym="*", ys=1, j=1, v=1, maxent_constraint_01=0.0001,
maxent_constraint_01v=0.0001, max_numareas=3)
spPmat = adf(spPmat); names(spPmat) = names(spmat); rownames(spPmat) = rownames(spmat)
spPmat
spPmat = symbolic_to_relprob_matrix_sp(spmat=spmat, cellsplit="\\\\+",
mergesym="*", ys=0.25, j=0.25, v=0.25, maxent_constraint_01=0.0001,
maxent_constraint_01v=0.0001, max_numareas=3)
spPmat = adf(spPmat); names(spPmat) = names(spmat); rownames(spPmat) = rownames(spmat)
spPmat
spPmat = symbolic_to_relprob_matrix_sp(spmat=spmat, cellsplit="\\\\+",
mergesym="*", ys=1, j=1, v=0, maxent_constraint_01=0.0001,
maxent_constraint_01v=0.0001, max_numareas=3)
spPmat = adf(spPmat); names(spPmat) = names(spmat); rownames(spPmat) = rownames(spmat)
spPmat
spPmat = symbolic_to_relprob_matrix_sp(spmat=spmat, cellsplit="\\\\+",
mergesym="*", ys=1, j=1, v=0, maxent_constraint_01=0.5,
maxent_constraint_01v=0.0001, max_numareas=3)
spPmat = adf(spPmat); names(spPmat) = names(spmat); rownames(spPmat) = rownames(spmat)
spPmat
spPmat = symbolic_to_relprob_matrix_sp(spmat=spmat, cellsplit="\\\\+",
mergesym="*", ys=1, j=0, v=0, maxent_constraint_01=0.5,
maxent_constraint_01v=0.0001, max_numareas=3)
spPmat = adf(spPmat); names(spPmat) = names(spmat); rownames(spPmat) = rownames(spmat)
spPmat
spPmat = symbolic_to_relprob_matrix_sp(spmat=spmat, cellsplit="\\\\+",
mergesym="*", ys=1, j=0, v=1, maxent_constraint_01=0.0001,
maxent_constraint_01v=0.5, max_numareas=3)
spPmat = adf(spPmat); names(spPmat) = names(spmat); rownames(spPmat) = rownames(spmat)
spPmat
Run the code above in your browser using DataLab