fit_sgd {RPANDA} | R Documentation |
Maximum likelihood fit of the SGD model
Description
Fits the SGD model with exponential growth of the metacommunity, by maximum likelihood. Notations follow Manceau et al. (2015)
Usage
fit_sgd(phylo, tot_time, par, f=1, meth = "Nelder-Mead")
Arguments
phylo |
an object of type 'phylo' (see ape documentation) |
tot_time |
the age of the phylogeny (crown age, or stem age if known). If working with crown ages, tot_time is given by max(node.age(phylo)$ages) |
par |
a numeric vector of initial values for the parameters (b,d,nu) to be estimated (these values are used by the optimization algorithm) |
f |
the fraction of extant species included in the phylogeny |
meth |
optimization to use to maximize the likelihood function, see optim for more details. |
Value
a list with the following components
model |
the name of the fitted model |
LH |
the maximum log-likelihood value |
aicc |
the second order Akaike's Information Criterion |
par |
a numeric vector of estimated values of b (birth), b-d (growth) and nu (mutation) |
Note
While b-d and nu can in general be well estimated, the likelihood surface is quite flat whith respect to b, such that the estimated b can vary a lot depending on the choice of the initial parameter values. Estimates of b should not be trusted.
Author(s)
M Manceau
References
Manceau, M., Lambert, A., Morlon, H. (2015) Phylogenies support out-of-equilibrium models of biodiversity Ecology Letters 18: 347-356
See Also
Examples
# Some examples may take a little bit of time. Be patient!
data(Calomys)
tot_time <- max(node.age(Calomys)$ages)
par_init <- c(1e7, 1e7-0.5, 1)
#fit_sgd(Calomys, tot_time, par_init, f=11/13)