Learn R Programming

BioGeoBEARS (version 0.2.1)

infprobs_to_probs_of_each_area: Convert probabilities of each state, to the probabilities of presence in each area

Description

Biogeographic inference in LAGRANGE and DIVA has focused heavily on inference of the exact ancestral state/geographic range. However, when the state space is large, there is often considerable uncertainty in the exact ancestral range. Even the ancestral state that confers the maximum likelihood on the data, and thus is the most probable ancestor, may have less than 50 probability, or even less (25 size of the state space. This function converts the probability of specific states/geographic ranges into the probability of presence/absence in each area. This can typically be inferred with much higher confidence.

Usage

infprobs_to_probs_of_each_area(relprobs_matrix, states_list)

Arguments

relprobs_matrix
A relative probabilities matrix returned by bears_2param_standard_fast or a similar function. The user should specify WHICH matrix in the results_object -- i.e., scaled conditional likelihoods on downpass or uppass, or actual marginal probabilities of ancestral states. (The latter is the main thing of interest.) This specification is done via e.g. relprobs_matrix = results_object$relative_probs_of_each_state_at_branch_top_AT_node_DOWNPASS..
states_list
A list of the possible states/geographic ranges, in 0-based index form.

Value

area_probs The probability of presence in each area.

References

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

Matzke_2012_IBS

See Also

bears_2param_standard_fast, get_ML_states, get_ML_probs, infprobs_to_probs_of_each_area_from_relprobs

Examples

Run this code
testval=1

Run the code above in your browser using DataLab