bears_5param_standard_fast: 5-parameter model, adding j (founder-event speciation), v...

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

View source: R/BioGeoBEARS_models_v1.R

Description

This implements a 5-parameter model, basically LAGRANGE or bears_2param_standard_fast, but with a parameter j controlling the relative weight of "founder-event speciation" (Matzke (2012)), and another parameter v controlling the relative weight of vicariance. The remainder of the weight (weights must sum to 1) is taken up by the range-copying and range-subset forms of sympatric speciation utilized in LAGRANGE and bears_2param_standard_fast. A fifth parameter, maxent_constraint_01, controls the relative probability of daughter lineages of different rangesizes. If maxent_constraint_01=0.0001, the smaller-ranged daughter lineage will have size 1 area, with probability 1. If maxent_constraint_01=0.5, all different rangesizes will have equal probability, and if maxent_constraint_01=0.9999, the largest possible range will have probability 1.

Usage

1
2
3
  bears_5param_standard_fast(trfn = "Psychotria_5.2.newick",
    geogfn = "Psychotria_geog.data", max_range_size = NULL,
    num_cores_to_use = NULL)

Arguments

trfn

The filename of the phylogenetic tree, in NEWICK format (http://evolution.genetics.washington.edu/phylip/newicktree.html). Tipnames should match the names in geogfn. See read.tree in APE for reading in phylogenetic trees.

geogfn

A PHYLIP-style file with geographic range data (see getranges_from_LagrangePHYLIP) for each tipname. This is the same format used by C++ LAGRANGE (SmithRee2010_CPPversion).

max_range_size

The maximum rangesize, in number of areas. Having a smaller maximum range size means that you can have more areas (the size of the state space is greatly reduced; see numstates_from_numareas.

num_cores_to_use

If >1, parallel processing will be attempted. Note: parallel processing via library (parallel) will work in Mac command-line R, but not in Mac GUI R.app.

Value

bears_output A list of outputs. bears_output$optim_result

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

Felsenstein, Joe. The Newick tree format. http://evolution.genetics.washington.edu/phylip/newicktree.html http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster https://code.google.com/p/lagrange/

Matzke_2012_IBS

ReeSmith2008

Ree2009configurator

SmithRee2010_CPPversion

Landis_Matzke_etal_2013_BayArea

See Also

bears_2param_standard_fast, numstates_from_numareas, getranges_from_LagrangePHYLIP, read.tree, calc_loglike_sp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
test=1

# Get the example files directory
extdata_dir = np(system.file("extdata", package="BioGeoBEARS"))
# tmp hard code: extdata_dir = "/Dropbox/_njm/__packages/BioGeoBEARS_setup/inst/extdata/"

# Set the filenames (Hawaiian Psychotria from Ree & Smith 2008)
trfn = np(paste(extdata_dir, "/Psychotria_5.2.newick", sep=""))
tr = read.tree(file=trfn)

geogfn = np(paste(extdata_dir, "/Psychotria_geog.data", sep=""))

# Look at the tree and ranges, for kicks
getranges_from_LagrangePHYLIP(lgdata_fn=geogfn)
tr

## Not run: 
# Run the ML search
bears_output = bears_5param_standard_fast(trfn=trfn, geogfn=geogfn)
bears_output

## End(Not run)

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