fit_pulsr: Fit repeated pulsR

Description Usage Arguments Value Note Author(s)

View source: R/fit_pulsr.R

Description

This function fits (potentially) several models of evolution on a phenotypic vector using Levy processes from the package pulsr. Each fitting can be replicated to ensure convergence to a single optimum likelihood.

Usage

1
fit_pulsr(trait_vector, tree, species_names, model_types, nrepet)

Arguments

trait_vector

A vector of phenotypic values across species.

tree

A phylogeny, in ape format.

species_names

A vector of species names.

model_types

The names of the models to fit, in a vector. See the scripts downloaded from pulsr's github (stored in analysis2/R) for a list of models available.

nrepet

The number of replicate analyses.

Value

A list of lists of outputs of the fitting function. Levels of nestedness: model type, replicates.

Note

This function was run on the cluster. It is made to call the functions in pulsr, which are not yet a working package but a bunch of scripts in a folder associated. So, this function won't work unless these scripts are availeble (see the source of the function to know where they should be). Also, this function runs on a single variable and not on a dataset of multiple variables because some variable cause convergence problems. This avoids the whole analysis to break down because of a single problematic variable in a multivariate dataset.

Author(s)

Raphael Scherrer


rscherrer/bop documentation built on May 22, 2019, 3:54 p.m.