divide_probs_by_number_of_options_nums: Divide each type of event by its frequency, return calculated...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/BioGeoBEARS_basics_v1.R

Description

In a speciation/cladogenesis matrix, the conditional probabilities of each row must sum to 1. This function sums the number of events of each category and scales them accordingly.

Usage

1

Arguments

spPmat

A matrix of numbers, where each cell contains the conditional probability of that ancestor–>(Left descendant,Right descendant) range inheritance scenario.

probmat

A matrix of text, describing each of the allowed range-inheritance events.

Details

This function returns the calculated conditional probabilities.

Value

spPmat A matrix of numbers, where each cell contains the conditional probability of that ancestor–>(Left descendant,Right descendant) range inheritance scenario.

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster

Matzke_2012_IBS

See Also

make_relprob_matrix_bi, divide_probs_by_number_of_options_txt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
testval=1
spmat = make_relprob_matrix_bi()
spmat

spmat1 = divide_probs_by_number_of_options_txt(spmat)
spmat1


probmat = spmat
spPmat = symbolic_to_relprob_matrix_sp(spmat, cellsplit="\\+",
mergesym="*", ys=1, j=0, v=1, maxent_constraint_01=0.0001,
maxent_constraint_01v=0.0001, max_numareas=3)
spPmat
probmat2 = divide_probs_by_number_of_options_nums(spPmat, probmat)
probmat2

probmat = spmat1
spPmat = symbolic_to_relprob_matrix_sp(spmat, cellsplit="\\+",
mergesym="*", ys=1, j=0, v=1, maxent_constraint_01=0.0001,
maxent_constraint_01v=0.0001, max_numareas=3)
spPmat
probmat3 = divide_probs_by_number_of_options_nums(spPmat, probmat)
probmat3

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.