model_info | R Documentation |
Generic function for pulling apart model fitted objects and obtaining phylogeny, data, model type and parameters
model_info(fit, ...)
fit |
a model fitted object (see |
... |
additional arguments to be passed to |
These functions are primarily used internally within the function
make_unit_tree
. A different model_info.xx
function is built for every implemented
class of model fitted object and is tailored to the specifics of the form of model output.
The return value will differ depending on the model used. For example, if a single phylogeny
is supplied which has been used to fit a single rate model, model_info
will return
a object of class fitC
, consisting of the original tree to be rescaled, the
original comparative dataset, the model class (e.g. "BM", "OU", etc.) and the model-specific
parameters.
The returned object needs to be of a class for which a make_model_phylo
function
exists. make_model_phylo
will take the object output by model_info
and
return a 'unit.tree' object.
a classed object compatibile with a make_model_phylo
function.
make_unit_tree
, make_model_phylo
## finch data data(finch) phy <- finch$phy data <- finch$data[,"wingL"] ## Not run: require(geiger) ## fit Brownian motion model ## using geiger's fitContinuous function fit.bm <- fitContinuous(phy=phy, dat=data, model="BM", control=list(niter=10), ncores=1) ## get model info using internal arbutus function info.bm <- model_info(fit.bm) ## now using diversitree function require(diversitree) bmlik <- make.bm(phy, data) fit.bm.dt <- find.mle(bmlik, x.init=1) info.bm.dt <- model_info(fit.bm.dt, lik=bmlik) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.