make_model_phylo: Rescale phylogeny based on fitted model parameters

View source: R/rescale-fitContinuous.R

make_model_phyloR Documentation

Rescale phylogeny based on fitted model parameters

Description

Rescales phylogeny to form a 'unit.tree' using parameters from fitted model

Usage

make_model_phylo(x, ...)

Arguments

x

an object inherited from a model_info function

...

additional arguments to be passed to make_model_phylo

Details

This is a generic function which rescales the phylogeny based on the model specific information. While the class and information may differ, the object must include the 'phylo' object to be rescaled and model specific information such as model type and parameter values.

To include additional types of models, researchers will need to build a new model_info function for the given model type. The output should be assigned a novel class. A make_model_phylo.class object will need to be created to perform the rescaling.

Value

a phylo object that can be used to from a unit.tree object

See Also

make_unit_tree

Examples

## 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)

## rescale phylogeny based on model info
make_model_phylo(info.bm)

## End(Not run)


mwpennell/arbutus documentation built on Oct. 6, 2022, 10 a.m.