A function for assessing whether models optimized well, identifying bad fits, and rerunning them if needed.

MiSSENet(misse.list, n.tries=2, remove.bad=TRUE, dont.rerun=FALSE, save.file=NULL, 
n.cores=1, sann=TRUE, sann.its=5000, sann.temp=5230, bounded.search=TRUE, 
starting.vals=NULL, turnover.upper=10000, eps.upper=3, trans.upper=100, restart.obj=NULL)

Arguments

misse.list

a misse list of model fits obtain from MiSSEGreedy.

n.tries

maximum number of retries for a given model.

remove.bad

a logical indicating whether models identified as poorly optimized (even after attempting to be refit) should be removed from misse.list.

dont.rerun

a logical indicating whether models identified as poorly optimized should be run. The default is FALSE, meaning they will be rerun. Note that if dont.rerun=TRUE and remove.bad=TRUE, the bad models will be removed from the input list; when remove.bad=FALSE only a vector of model numbers are provided.

save.file

file to use to save the full model fits before removing the poorly optimized ones.

n.cores

how many cores to run this on in parallel.

sann

a logical indicating whether a two-step optimization procedure is to be used. The first includes a simulate annealing approach, with the second involving a refinement using subplex. The default is FALSE.

sann.its

a numeric indicating the number of times the simulated annealing algorithm should call the objective function.

sann.temp

the starting temperature for the simulated annealing. Higher temperatures results in the chain sampling a much wider space initially. The default of 5320 is based on the default of the GenSA package. For larger trees setting this value higher in conjunction with more sann.its can drastically improve performance.

bounded.search

a logical indicating whether or not bounds should be enforced during optimization. The default is TRUE.

starting.vals

a numeric vector of length 3 with starting values for the model. Position [1] sets turnover, [2] sets extinction fraction, and [3] transition rates between distinct diversification rates.

turnover.upper

sets the upper bound for the turnover parameters.

eps.upper

sets the upper bound for the eps parameters.

trans.upper

sets the upper bound for the transition rate parameters.

restart.obj

an object of class that contains everything to restart an optimization.

Details

This function is used to triage poorly optimized models after a MiSSEGreedy run. It is normally invoked within MiSSEGreedy, but it can also be used as a standalone function, to simply identify poorly identify models and/or rerun them.

References

Vasconcelos, T., B.C. O'Meara, and J.M. Beaulieu. 2022. A flexible method for estimating tip diversification rates across a range of speciation and extinction scenarios. Evolution, 76:1420-1433.

Author

Jeremy M. Beaulieu