powered by
Fits the SGD model with exponential growth of the metacommunity, by maximum likelihood. Notations follow Manceau et al. (2015)
fit_sgd(phylo, tot_time, par, f=1, meth = "Nelder-Mead")
a list with the following components
the name of the fitted model
the maximum log-likelihood value
the second order Akaike's Information Criterion
a numeric vector of estimated values of b (birth), b-d (growth) and nu (mutation)
an object of type 'phylo' (see ape documentation)
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)
a numeric vector of initial values for the parameters (b,d,nu) to be estimated (these values are used by the optimization algorithm)
the fraction of extant species included in the phylogeny
optimization to use to maximize the likelihood function, see optim for more details.
M Manceau
Manceau, M., Lambert, A., Morlon, H. (2015) Phylogenies support out-of-equilibrium models of biodiversity Ecology Letters 18: 347-356
likelihood_sgd
# 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)
Run the code above in your browser using DataLab