Learn R Programming

BioGeoBEARS (version 0.2.1)

simstates_to_probs_of_each_area: Convert simulated states to probabilities of each area

Description

Basically this function assigns probability 1 to occupied areas according to the simulated state for a node, and probability 0 for the other areas. These data -- the simulated truth -- can then be compared to the inferred probabilities of presence in each area, from infprobs_to_probs_of_each_area.

Usage

simstates_to_probs_of_each_area(simulated_states_by_node, states_list, relprobs_matrix)

Arguments

simulated_states_by_node
The simulated states by node (0-based indices).
states_list
A list of the possible states/geographic ranges, in 0-based index form.
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..

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

simulate_biogeog_history, infprobs_to_probs_of_each_area

Examples

Run this code
testval=1

Run the code above in your browser using DataLab