influ_continuous {sensiPhy}R Documentation

Influential Species Detection - Trait Evolution Continuous Characters

Description

Fits models for trait evolution of continuous characters, detecting influential species.

Usage

influ_continuous(
  data,
  phy,
  model,
  bounds = list(),
  cutoff = 2,
  n.cores = NULL,
  track = TRUE,
  ...
)

Arguments

data

Data vector for a single continuous trait, with names matching tips in phy.

phy

A phylogeny (class 'phylo') matching data.

model

The evolutionary model (see Details).

bounds

settings to constrain parameter estimates. See fitContinuous

cutoff

The cut-off parameter for influential species (see Details).

n.cores

number of cores to use. If 'NULL', number of cores is detected.

track

Print a report tracking function progress (default = TRUE)

...

Further arguments to be passed to fitContinuous

Details

This function sequentially removes one species at a time, fits different models of continuous character evolution using fitContinuous, stores the results and calculates the effects on model parameters.

influ_continuous detects influential species based on the standardised difference in the rate parameter sigsq and the optimisation parameter optpar (e.g. lamda, kappa, alpha, depending on which model is set), when removing a given species compared to the full model including all species. Species with a standardised difference above the value of cutoff are identified as influential.

Different evolutionary models from fitContinuous can be used, i.e. BM,OU, EB, trend, lambda, kappa, delta and drift.

See fitContinuous for more details on evolutionary models.

Value

The function tree_discrete returns a list with the following components:

call: The function call

cutoff: The value selected for cutoff

data: The original full data vector

optpar: Transformation parameter used (e.g. lambda, kappa etc.)

full.model.estimates: Parameter estimates (rate of evolution sigsq and where applicable optpar), root state z0, AICc for the full model without deleted species.

influential_species: List of influential species, based on standardised difference in estimates for sigsq and optpar. Species are ordered from most influential to less influential and only include species with a standardised difference > cutoff.

sensi.estimates: Parameter estimates (sigsq and optpar),(percentual) difference in parameter estimate compared to the full model (DIFsigsq, sigsq.perc,sDIFsigsq, DIFoptpar, optpar.perc,sDIFoptpar), AICc and z0 for each repeat with a species removed.

Author(s)

Gijsbert Werner & Gustavo Paterno

References

Paterno, G. B., Penone, C. Werner, G. D. A. sensiPhy: An r-package for sensitivity analysis in phylogenetic comparative methods. Methods in Ecology and Evolution 2018, 9(6):1461-1467.

Yang Z. 2006. Computational Molecular Evolution. Oxford University Press: Oxford.

Harmon Luke J, Jason T Weir, Chad D Brock, Richard E Glor, and Wendell Challenger. 2008. GEIGER: investigating evolutionary radiations. Bioinformatics 24:129-131.

See Also

fitContinuous

Examples

## Not run: 
#Load data:
data("primates")
#Model trait evolution accounting for influential species
adultMass<-primates$data$adultMass
names(adultMass)<-rownames(primates$data)
influ_cont<-influ_continuous(data = adultMass,phy = primates$phy[[1]],
model = "OU",cutoff = 2,n.cores = 2,track = TRUE)
#Print summary statistics
summary(influ_cont)
sensi_plot(influ_cont)
sensi_plot(influ_cont,graphs="sigsq")
#' sensi_plot(influ_cont,graphs="optpar")
#Use a different evolutionary model or cutoff 
influ_cont2<-influ_continuous(data = adultMass,phy = primates$phy[[1]],
model = "lambda",cutoff = 1.2,n.cores = 2,track = TRUE)
summary(influ_cont2)
sensi_plot(influ_cont2)
influ_cont3<-influ_continuous(data = adultMass,phy = primates$phy[[1]],
model = "BM",cutoff = 2,n.cores = 2,track = TRUE)
summary(influ_cont3)

## End(Not run)

[Package sensiPhy version 0.8.5 Index]