Package PVR. February 15, 2013

Similar documents
Package OUwie. August 29, 2013

Package symmoments. R topics documented: February 20, Type Package

Package vhica. April 5, 2016

Package BayesNI. February 19, 2015

Package gtheory. October 30, 2016

Package MultisiteMediation

Package mpmcorrelogram

An introduction to the picante package

Package rnmf. February 20, 2015

Package dhsic. R topics documented: July 27, 2017

Package JointModel. R topics documented: June 9, Title Semiparametric Joint Models for Longitudinal and Counting Processes Version 1.

Package TwoStepCLogit

Package sscor. January 28, 2016

Package magma. February 15, 2013

Package ltsbase. R topics documented: February 20, 2015

Package mar. R topics documented: February 20, Title Multivariate AutoRegressive analysis Version Author S. M. Barbosa

Package pssm. March 1, 2017

Package anoint. July 19, 2015

Package depth.plot. December 20, 2015

Package rarpack. August 29, 2016

Package plspolychaos

Package epr. November 16, 2017

Package drgee. November 8, 2016

Package severity. February 20, 2015

Package blme. August 29, 2016

Package misctools. November 25, 2016

On the selection of phylogenetic eigenvectors for ecological analyses

Package LIStest. February 19, 2015

Package velociraptr. February 15, 2017

Package polypoly. R topics documented: May 27, 2017

Package BayesTreePrior

Package SpatialNP. June 5, 2018

Package BGGE. August 10, 2018

Package goftest. R topics documented: April 3, Type Package

Package CovSel. September 25, 2013

Package IUPS. February 19, 2015

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy

Package weightquant. R topics documented: December 30, Type Package

Package ShrinkCovMat

Package flora. R topics documented: August 29, Type Package. Title flora: taxonomical information on flowering species that occur in Brazil

Package aspi. R topics documented: September 20, 2016

Package SK. May 16, 2018

Package nardl. R topics documented: May 7, Type Package

Package NonpModelCheck

Package hierdiversity

Package RootsExtremaInflections

Package gwqs. R topics documented: May 7, Type Package. Title Generalized Weighted Quantile Sum Regression. Version 1.1.0

Package EMVS. April 24, 2018

Package BNN. February 2, 2018

Package MonoPoly. December 20, 2017

Package RI2by2. October 21, 2016

Biol 206/306 Advanced Biostatistics Lab 11 Models of Trait Evolution Fall 2016

Euclidean Nature of Phylogenetic Distance Matrices

Package survidinri. February 20, 2015

Package gma. September 19, 2017

Package alabama. March 6, 2015

Package darts. February 19, 2015

Package CommunityCorrelogram

Package abundant. January 1, 2017

Package OrdNor. February 28, 2019

Package CPE. R topics documented: February 19, 2015

Package WGDgc. October 23, 2015

Package idmtpreg. February 27, 2018

Package invgamma. May 7, 2017

Evolutionary Physiology

Package SimSCRPiecewise

Package HIMA. November 8, 2017

Package covtest. R topics documented:

Package flexcwm. R topics documented: July 11, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.0.

Package EDR. September 14, 2016

Package KRLS. July 10, 2017

Package mmm. R topics documented: February 20, Type Package

Package SimCorMultRes

Package lomb. February 20, 2015

Package rgabriel. February 20, 2015

Package Grace. R topics documented: April 9, Type Package

Package MicroMacroMultilevel

Package HarmonicRegression

Package ARCensReg. September 11, 2016

Package leiv. R topics documented: February 20, Version Type Package

Package codadiags. February 19, 2015

Package Select. May 11, 2018

Package crrsc. R topics documented: February 19, 2015

Package ICGOR. January 13, 2017

Package generalhoslem

Package flexcwm. R topics documented: July 2, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.1.

Package funrar. March 5, 2018

Package peacots. November 13, 2016

Package unbalhaar. February 20, 2015

Package neuralnet. August 16, 2016

Package cellscape. October 15, 2018

Package pfa. July 4, 2016

Package NlinTS. September 10, 2018

Package metansue. July 11, 2018

Package bayeslm. R topics documented: June 18, Type Package

Package milineage. October 20, 2017

Package spthin. February 20, 2015

Package IsingFit. September 7, 2016

Package orclus. R topics documented: March 17, Version Date

Package MACAU2. R topics documented: April 8, Type Package. Title MACAU 2.0: Efficient Mixed Model Analysis of Count Data. Version 1.

Transcription:

Package PVR February 15, 2013 Type Package Title Computes phylogenetic eigenvectors regression (PVR) and phylogenetic signal-representation curve (PSR) (with null and Brownian expectations) Version 0.2.1 Date 2012-10-03 Author Thiago Santos, Jose Alexandre Diniz-Filho, Thiago Rangel e Luis Mauricio Bini Depends R (>= 2.14.0), ape, splancs, methods Suggests picante, geiger Maintainer Thiago Santos <thiagobioufg@gmail.com> Computes PVR and PSR. License GPL (>= 2) Repository CRAN Date/Publication 2013-02-08 19:55:05 NeedsCompilation no R topics documented: PVR-package........................................ 2 PSR............................................. 3 PSR-class.......................................... 4 PSRplot........................................... 6 PVR............................................. 7 PVR-class.......................................... 9 PVRdecomp......................................... 10 VarPartplot......................................... 11 Index 13 1

2 PVR-package PVR-package Computes Phylogenetic eigenvectors Regression and Phylogentic Signal-Representation curve (with null and neutral expectations). Details Computes PVR and PSR curve along with some plot utilitties. Package: PVR Type: Package Version: 1.0 Date: 2012-06-23 License: GPL >= 2 Maintainer: Thiago Santos <thiagobioufg@gmail.com> Legendre, P. and Legendre, L. (1998). Numerical ecology, 2nd Englished. Elsevier. PVR-class, PSR-class, PVR, PSR, PVRdecomp, PSRplot, VarPartplot #Creating a 10 tips ultrametric random phylogeny library(ape) tree <- rcoal(10) #Decomposing phylogenetic distance matrix derived from tree into a set of orthogonal vectors

PSR 3 x <- PVRdecomp(tree) trait <- runif(10) y <- PSR(x, trait) plot(y) PSR Creates a phylogenetic signal-representation (PSR) curve for a given phylogeny and trait set and computes its area. Phylogenetic signal-representation (PSR) curve, built upon phylogenetic eigenvector regression (PVR). Sequential PVR models are fitted after successively increasing the number of eigenvectors and plotting their R2 against the accumulated eigenvalues. The PSR area, expressing deviations from Brownian motion, is strongly correlated with Blomberg s K-statistics, so nonlinear PSR curves reveal if traits are evolving at a slower or higher rate than expected. The PSR area is also correlated with phylogenetic half-life under an OU process, so both methods describe the relationship between interspecific variation and time since divergence among species shape. Usage PSR(x, trait = NULL, null.model = FALSE, Brownian.model = FALSE, times = 1000) Arguments x trait null.model A object of class PVR (created using PVRdecomp function). A vector, data frame or matrix that contains contiuous or binary traits sets (for data frames and matrices, each column must represent a trait set). For now, only the first colunm will be used. Logical. Should the function estimates the null expectation for the PSR area. Default is FALSE. Brownian.model Logical. Should the function estimates the Brownian (neutral) expectation for the PSR area. Default is FALSE. times Number of iterations used in null.model and Brownian.model. Value PSR function returns a object of (S4) class PSR that extends the (S4) class PVR, by adding: a PSR slot that contains the area (and p if null.model = TRUE) for each trait set, the cumulative eigenvalues and R2 that determine the curve; a slot with the null and neutral expectations (if any).

4 PSR-class PVR, PVRdecomp, PSRplot, VarPartplot library(splancs) #Creating a 10 tips ultrametric random phylogeny library(ape) tree <- rcoal(10) #Decomposing phylogenetic distance matrix derived from tree into a set of orthogonal vectors x <- PVRdecomp(tree) trait <- runif(10) y <- PSR(x, trait) plot(y) PSR-class Class "PSR" A S4 class that extends S4 PVR class in order to accommodate PSR analysis results. Objects from the Class Objects can be created by calls of the form new("psr",...). Slots PSRarea: Object of class "data.frame" that contains PSR curve area. PSR: Object of class "data.frame" that contais accumulated r squared and eigenvalues. Expect.area.values: Object of class "list" that contains the expected null and neutral area values. nullpsr: Object of class "matrix" nested in the Expect.area.values slot that contains the expected null area values.

PSR-class 5 Extends BrownianPSR: Object of class "matrix" nested in the Expect.area.values slot that contains the expected Brownian (neutral) area values. Eigen: Object of class "list" that contains the eigenvalues and eigenvectors generated by phylogenetic distance matrix eigendecomposition. Inherited from PVR class. phydist: Object of class "matrix" that contains a phylogenetic distance matrix. Inherited from PVR class. phylo: Object of class "phylo" that contains a phylogeny. Inherited from PVR class. Selection: Object of class "list" that contains the selection method (along with its statistics) used to select the vectors, the selected vectors IDs and a matrix that contains the selected vectors. Inherited from PVR class. PVR: Object of class "list" that contains the Philogenetic EigenVectors Regression r squared and residuals. Inherited from PVR class. VarPart: Object of class "list" that contains the variation partition components. Inherited from PVR class. Class "PVR", directly. Methods plot signature(x = "PSR"):... show signature(object = "PSR"):... Legendre, P. and Legendre, L. (1998). Numerical ecology, 2nd Englished. Elsevier. PVR-class, PVR, PSR, PVRdecomp, PSRplot, VarPartplot showclass("psr")

6 PSRplot PSRplot Plot function for objects of class PSR Usage Plot PSR curve along with null and neutral expectations curves. PSRplot(x, info = c("area", "null", "Brownian", "both"),...) Arguments x info An object of class PSR Type of information to be ploted. It can be "area" (to plot only the PSR curve), "null" (to plot PSR curve and null PSR curve), "neutral" (to plot PSR curve and neutral PSR curve) and "both" (to plot PSR curve and both null and neutral PSR curve).... Parameters passed to the plot function. PSR, PVRdecomp, PVR, VarPartplot library(splancs) #Creating a 10 tips ultrametric random phylogeny library(ape) tree <- rcoal(10) #Decomposing phylogenetic distance matrix derived from tree into a set of orthogonal vectors x <- PVRdecomp(tree)

PVR 7 trait <- runif(10) res <- PSR(x, trait = trait, null.model = TRUE, Brownian.model = TRUE, times = 10) PSRplot(res, info = "both") PVR Phylogenetic eigenvectors regression. The phylogenetic eigenvector regression (PVR) starts by performing an eigendecomposition of a pairwise double-centered phylogenetic distance matrix between species. The eigenvectors (representing the traits under analysis) estimated values express phylogenetic trends in data and residuals express independent evolution of each species. Usage PVR(x, phy = NULL, trait = NULL, envvar = NULL, method = "moran", weights = NULL, scaled = FALSE, si Arguments x phy trait envvar An object of class PVR (created by the PVRdecomp function) or class PSR (requiered by the "PSR" method). An object of class phylo that contains an ultrametric phylogeny. A vector, data frame or matrix that contains traits sets (for data frames and matrices, each column must represent a trait set). A vector, data frame or matrix that contains environmental variables. Used to estimates the variation of a trait set that is explained by phylogeny and by environment. method Character string. A name for the eigenvectors selection method. It can be "moran", "stepwise", "psr" or "sequential". weights Weighting matrix based on Phylogenetic distances used in the "moran" method. If no weights matrix is provided, weights will be set to max(d) - Dij, where D is the phylogenetic distance matrix. scaled Logical. Should the phylogenetic distances be scaled into the range of 0 to 1. Default is FALSE. significance alternative MI.treshold sig.treshold Logical. Should the eigenvectors selected by the "moran" method be selected by the significance of residuals autocorrelation. If FALSE the eigenvectors will be selected by Moran s I values. The alternative hypothesis used to compute the significance level when selecting eigenvectors by the "moran" method. Minimum residuals Moran s I value used to select eigenvectors when significance is FALSE. The significance treshold used to select eigenvectors by the "moran" method.

8 PVR psr.treshold The minimum acumulate R2 gain treshold used to select eigenvectors by the "PSR" method. accvalue.treshold Relative accumulated eigenvalue treshold use to select the eigenvectors by the "sequential" method.... Parameters passed to the stepwise regression used in the "AIC" method Value A PVR class object. phylogenetic inertia. Evolution, 52:1247-1262. Legendre, P. and Legendre, L. (1998). Numerical ecology, 2nd Englished. Elsevier. Desdevises, Y., Legendre, P., Azouzi, L. and Morand, S. (2003). Quantifying phylogenetic structured environmental variation, Evolution, 57(11):2647-2652 PSR, PVRdecomp, PSRplot, VarPartplot library(ape) tree <- rcoal(10) #Decomposing phylogenetic distance matrix derived from tree into a set of orthogonal vectors x <- PVRdecomp(tree) trait <- runif(10) y <- PVR(x, trait = trait, method = "moran") str(y)

PVR-class 9 PVR-class Class "PVR" A S4 class that contains eigenvalues and eigenvectors from decomposition of a phylogenetic distance matrix and PVR r squared and residuals. Objects from the Class Objects can be created by calls of the form new("pvr",...). Slots Eigen: Object of class "list" that contains the eigenvalues and eigenvectors generated by phylogenetic distance matrix eigendecomposition. phydist: Object of class "matrix" that contains a phylogenetic distance matrix. phylo: Object of class "phylo" that contains a phylogeny. Selection: Object of class "list" that contains the selection method (along with its statistics) used to select the vectors, the selected vectors IDs and a matrix that contains the selected vectors. PVR: Object of class "list" that contains the Philogenetic EigenVectors Regression r squared and residuals. VarPart: Object of class "list" that contains the variation partition components. Methods show signature(object = "PVR"): Always print the Eigen slot. Legendre, P. and Legendre, L. (1998). Numerical ecology, 2nd Englished. Elsevier.

10 PVRdecomp PSR-class, PVR, PSR, PVRdecomp, PSRplot, VarPartplot showclass("pvr") PVRdecomp Phylogenetic distances matrix (eigen)decomposition. The PVRdecomp function decompose phylogenetic distance matrices (computed based on phylogenies) into a set of orthongonal eigenvectors Usage PVRdecomp(phy, type = "newick", dist = NULL, scale = FALSE,...) Arguments phy type dist An object of class phylo that contains a ultrametric phylogeny with branch lengths or a character string that represents a phylogeny file (must have full path) of type given by type. A character string with the phylogeny file format. It can be "newick" or "nexus". Used only if phy is a character string, ignored otherwise. A phylogenetic distance matrix. Not used. scale Logical. Should the phylogenetic distances be scaled into the range of 0 to 1. Default is FALSE.... Not used. Value The PVRdecomp funtion returns a object of (S4) class PVR with an Eigen slot that contains eigenvalues and eigenvectors computed after the matrix decomposition.

VarPartplot 11 PVR, PSR library(ape) tree <- rcoal(10) #Decomposing phylogenetic distance matrix derived from tree into a set of orthogonal vectors x <- PVRdecomp(tree, scale = TRUE) str(x) VarPartplot Plot function for objects of class PVR to show variation partition components. Plot a, b, c and d components of traits variation partition between phylogeny and environment (as defined by Desdevises et al., 2003). Usage VarPartplot(x,...) Arguments x An object of class PVR with a non NULL slot VarPart.... Parameters passed to the plot function.

12 VarPartplot Legendre, P. and Legendre, L. (1998). Numerical ecology, 2nd Englished. Elsevier. Desdevises, Y., Legendre, P., Azouzi, L. and Morand, S. (2003). Quantifying phylogenetic structured environmental variation, Evolution, 57(11):2647-2652. PSR, PVRdecomp, PVR, PSRplot library(ape) tree <- rcoal(10) #Decomposing phylogenetic distance matrix derived from tree into a set of orthogonal vectors x <- PVRdecomp(tree) trait <- runif(10) envvar <- runif(10) y <- PVR(x, trait = trait, envvar = envvar, method = "moran") VarPartplot(y)

Index Topic PSR area PSRplot, 6 Topic PSR VarPartplot, 11 Topic PVR PSRplot, 6 Topic Phylogenetic models PVR, 7 Topic Phylogenetic signal PVR, 7 VarPartplot, 11 Topic classes PSR-class, 4 PVR-class, 9 Topic package PVR-package, 2 Topic phylogenetic signal PSR, 3 PVRdecomp, 10 Topic phylogeny PSR, 3 PVRdecomp, 10 plot,psr-method (PSR-class), 4 PSR, 2, 3, 5, 6, 8, 10 12 PSR-class, 4 PSRplot, 2, 4, 5, 6, 8, 10, 12 PVR, 2, 4 6, 7, 10 12 PVR-class, 9 PVR-package, 2 PVRdecomp, 2, 4 6, 8, 10, 10, 12 show,psr-method (PSR-class), 4 show,pvr-method (PVR-class), 9 VarPartplot, 2, 4 6, 8, 10, 11 13