一点一点来吧——
library(PVR)
tree <- rcoal(10) generate trees by randomly clustering the tips
#Decomposing phylogenetic distance matrixderived from tree into a set of orthogonal vectors
x <- PVRdecomp(tree) 分解phylogenetic距离矩阵(计算基于phylogenetic)成一组正交特征向量
trait <- runif(10) generates random deviates
y <- PVR(x, trait = trait, method ="moran") The phylogenetic eigenvector regression (PVR) starts by performing aneigendecomposition of a pairwise double-centered phylogenetic distance matrixbetween species. The eigenvectors (representing the traits under analysis)estimated values express phylogenetic trends in data and residuals expressindependent evolution of each species.
X: n object of class PVR
trait :A vector, data frame or matrix that contains traits sets (for dataframes and matrices, each column must represent a trait set)
method Character string. A name for the eigenvectors selection method. It can be "moran", "stepwise", "psr" or "sequential".
str(y) 显示y的结构