size_species_matrix: Calculate the dimensions of the cladogenesis/speciation...

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

View source: R/BioGeoBEARS_basics_v1.R

Description

This function calculates the dimensions of the cladogenesis/speciation matrix describing the transition probabilities between ancestral geographic ranges and descendant geographic range pairs on Left (L) and Right (R) branches.

Usage

1
2
  size_species_matrix(states_list = default_states_list(),
    printwarn = 1)

Arguments

states_list

A list of states, where each state consists of a list of areas. A default example list is provided.

printwarn

If printwarn>0 (printwarn=1 by default), then print to screen a message describing the size of the cladogenesis matrix.

Details

Under a cladogenesis model of geographic range change, the model will give the conditional probability of each possible combination of geographic ranges on the Left (L) and Right (R) descendant branches, conditional on a particular ancestral state. A matrix representing these transitions will have numstates ancestral states, and numstates*numstates possible descendant pairs. Many of these will have 0 conditional probability under the model, but, for visualization or experimental purposes it can be useful to display them all.

However, because numstates = 2^numareas under default conditions, and the number of cells the processor has to consider (without optimization tricks) is numstates^3, this transition matrix can very quickly become cumbersome to explicitly calculate or display. size_species_matrix allows the user to check this ahead of time.

See numstates_from_numareas for the details of calculating numstates.

At various points in BioGeoBEARS code, the text and numeric versions of the cladogenesis matrix are named spmat and spPmat, respectively.

Value

spmat_dimensions The dimensions of the cladogenesis matrix.

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster https://code.google.com/p/lagrange/

Matzke_2012_IBS

ReeSmith2008

See Also

make_relprob_matrix_de, make_spmat_row

Examples

1
2
3
4
5
testval=1
spmat_dimensions = size_species_matrix(
states_list=list("_", c("A"), c("B"), c("C"), c("A","B"),
c("B","C"), c("A","C"), c("A","B","C")), printwarn=1)
spmat_dimensions

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