This function implements a biogeographical model with 2
free parameters (d, rate of dispersal/range
addition, and e, rate of extinction/range
contraction), and a fixed cladogenesis model with equal
probability of vicariance, sympatric-subset, and
sympatric-range-copying events, and with the smaller
descendant always having a range size of 1 area. Once
the model is set up, it is input into the optimization
optimx (the more common
optim can also be used by editing
the function), and
calc_loglike_sp is used
to calculate the log-likelihood of each set of
parameters. Once the parameter values that give the data
the maximum likelihood are found, they are reported back
to the function and returned to the user.
1 2 3
The filename of the phylogenetic tree, in
Tipnames should match the names in geogfn. See
A PHYLIP-style file with geographic range
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
If >1, parallel processing will
be attempted. Note: parallel processing via
This duplicates the model used in the standard LAGRANGE implementation (Ree et al. (2008), Ree (2009), Smith et al. (2010), with no constraints on dispersal or range size.
Here, all of the fastest processing options have been used.
Model implementations are provided to show the user how a
specific model can be set up and optimized. This is
preferable compared to the "black-box" nature of most
other inference packages. Users are encouraged to
experiment. Useful models can be added to later versions
bears_output A list of outputs.
Nicholas J. Matzke firstname.lastname@example.org
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/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
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_2param_standard_fast(trfn=trfn, geogfn=geogfn) bears_output ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.