get_infprobs_of_simstates: Get the probabilities of the true (simulated) states

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

View source: R/BioGeoBEARS_simulate_v1.R

Description

Basically this function assigns probability 1 to the simulated state/geographic range, and probability 0 for the other states/geographic ranges. These data – the simulated truth – can then be compared to the inferred probabilities for the states, from e.g. get_ML_probs.

Usage

1
  get_infprobs_of_simstates(relprobs_matrix, simhist_row)

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

simhist_row

A row from a table, which must have a column named simulated_states_by_node_txt.

Value

infprobs_of_simstates The probability of each state at each node (all 1s and 0s).

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

simulate_biogeog_history, infprobs_to_probs_of_each_area

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.