Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/BioGeoBEARS_basics_v1.R
This does the equivalent of
symbolic_to_P_matrix, but for a
speciation/cladogenesis matrix.
1 2 3 4 | 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, ...)
|
spmat |
The speciation/cladogenesis matrix, with text formula. |
cellsplit |
The symbol to split the formulas on. Default "\\+" (plus symbol, with escape code). |
mergesym |
The symbol to merge the formulas with. Default "+". |
ys |
Relative weight of fully sympatric speciation
(range-copying) and sympatric "subset" speciation.
Default |
v |
Relative weight of vicariant speciation. Default
|
j |
Relative weight of "founder event
speciation"/jump speciation. Default |
maxent_constraint_01 |
Parameter which assigns
relative probabilities to different descendants range
sizes, for the smaller descendant. Values can range from
0.0001 to 1. If |
maxent_constraint_01v |
Works the same as
|
max_numareas |
The maximum number of areas possible allowed for the smaller-ranged-daughter in either vicariant or sympatric types of cladogenesis/speciation. |
... |
Additional arguments to pass to
|
These are 1-event probability matrices, not instantaneous rate matrices.
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.
cellval The output cell value.
Go BEARS!
Nicholas J. Matzke matzke@berkeley.edu
http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster https://code.google.com/p/lagrange/
Matzke_2012_IBS
ReeSmith2008
symbolic_cell_to_relprob_cell_sp,
make_relprob_matrix_de
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.