Get the probability of the ML state for each node, from a BioGeoBEARS model results list

Description

This function extracts the probability of the ML states from the results list produced by bears_2param_standard_fast or a similar ML search function.

Usage

1
  get_ML_probs(relprobs_matrix, unlist_TF = TRUE)

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

unlist_TF

Unlist the output? Default TRUE.

Details

This is useful for displaying e.g. pie charts of the probability of the ML ancestral state at each node.

Note, though, that it is somewhat peculiar and arbitrary to focus on the ancestral states just at nodes, particularly in the context of fossils with time ranges and geographic ranges.

Value

inf_probsvec The inferred vector of probabilities of ML states.

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster http://blog.phytools.org/2013/03/marginal-ancestral-state-reconstruction.html https://code.google.com/p/lagrange/

Matzke_2012_IBS

See Also

get_ML_probs, bears_2param_standard_fast, get_ML_state_indices

Examples

1
testval=1

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.