infprobs_to_probs_of_each_area: Convert probabilities of each state, to the probabilities of...

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

View source: R/BioGeoBEARS_simulate_v1.R

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

1
2
  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.

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

bears_2param_standard_fast, get_ML_states, get_ML_probs, infprobs_to_probs_of_each_area_from_relprobs

Examples

1
testval=1

Example output

Loading required package: rexpokit
Loading required package: cladoRcpp
Loading required package: ape
Loading required package: phylobase

Attaching package: 'phylobase'

The following object is masked from 'package:ape':

    edges

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