define_BioGeoBEARS_run(abbr = "default", description = "defaults", BioGeoBEARS_model_object = define_BioGeoBEARS_model_object(), trfn = "Psychotria_5.2.newick", geogfn = "Psychotria_geog.data", timesfn = NA, distsfn = NA, dispersal_multipliers_fn = NA, area_of_areas_fn = NA, areas_allowed_fn = NA, detects_fn = NA, controls_fn = NA, max_range_size = NA, states_list = NULL, force_sparse = FALSE, use_detection_model = FALSE, print_optim = TRUE, num_cores_to_use = NA, cluster_already_open = FALSE, use_optimx = TRUE, return_condlikes_table = FALSE, calc_TTL_loglike_from_condlikes_table = TRUE, calc_ancprobs = TRUE, fixnode = NULL, fixlikes = NULL, speedup = TRUE, tmpwd = getwd())
define_BioGeoBEARS_model_object()
read.tree
in APE for reading in
phylogenetic trees. Default "Psychotria_5.2.newick"getranges_from_LagrangePHYLIP
)
for each tipname. This is the same format used by C++
LAGRANGE (SmithRee2010_CPPversion). Default
"Psychotria_geog.data"calc_obs_like
.calc_obs_like
.numstates_from_numareas
.FALSE
, which means dense matrix
exponentiation is always used. If NA
, the program
will use sparse matrix exponentiation for transition
matrices above rank 128 (size 128x128). NOTE: Sparse
matrix exponentiation seems to give correlated, but not
exact, results, and these errors may accumulate.
Presumably the problems become less with larger matrices,
but I have not explored this in detail.tip_condlikes_of_data_on_each_state
.library (parallel)
will work in Mac command-line
R, but not in Mac GUI R.app
.cluster_already_open =
makeCluster(rep("localhost",num_cores_to_use), type =
"SOCK")
. Note: this will work on most platforms,
including Macs running R from command line, but will NOT
work on Macs running the R GUI R.app
, because
parallel processing functions like MakeCluster
from e.g. library(parallel)
for some reason crash
R.app. The program runs a check for R.app and will just
run on 1 node if found.optimx
rather that
optim
.TRUE
, return the
table of ALL conditional likelihood results, including at
branch subsections (only some should be used in
calculating the final log-likelihood of the geography
range data on the tree!)TRUE
(default), calculate
and return the necessary pieces (uppass and downpass
probs) for ancestral states.TRUE
(default), set the maximum
number of iterations to itnmax=50*(number of free
parameters)
, instead of the optimx
default, 250.
Also set optimx
reltol
parameter to 0.001
(instead of the default, ~1e-8).inputs
Inputs for ML search.
Matzke_2012_IBS
readfiles_BioGeoBEARS_run
,
define_BioGeoBEARS_model_object
,
setwd
, getwd