spectR_t: Spectral density plot of phylogenetic trait data

View source: R/spectR_t.R

spectR_tR Documentation

Spectral density plot of phylogenetic trait data

Description

Computes the spectra of eigenvalues for the modified graph Laplacian of a phylogenetic tree with associated tip data, convolves the eigenvalues with a Gaussian kernel and plots the density profile of eigenvalues, and estimates the summary statistics of the profile.

Usage

spectR_t(phylo, dat, draw=F)

Arguments

phylo

an object of type 'phylo' (see ape documentation)

dat

a vector of trait data associated with the tips of the phylo object; tips and trait data should be aligned

draw

if true, the spectral density profile of the phylogenetic trait data is plotted

Value

a list with the following components:

eigenvalues

the vector of eigenvalues

splitter

the largest (or principal) eigenvalue of the spectral density profile

fragmenter

the skewness of the spectral density profile

tracer

the largest y-axis value of the spectral density profile

Author(s)

E Lewitus

References

Lewitus, E., Morlon, H. (2019) Characterizing and comparing phylogenetic trait data from their normalized Laplacian spectrum, bioRxiv doi: https://doi.org/10.1101/654087

Examples

tr<-rtree(10)
dat<-runif(10,1,2)
spectR_t(tr,dat,draw=TRUE)

hmorlon/PANDA documentation built on April 24, 2024, 3:27 a.m.