全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
1995 2
2013-10-15
悬赏 20 个论坛币 未解决
各位大侠,有没有熟悉PVR(phylogenetic eigenvectors regression)包的啊?本人是R初学者,最近想做phylogenetic eigenvectors regression分析,对于程序包给出的应用实例看不明白,代码如下:library(ape)
library(PVR)
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)
其中我自己有物种之间的遗传距离数据,也就是不需要构建进化树进行分解,我不知道这种情况下,该怎么去进行数据分析,请知道的大侠不吝赐教,先谢谢了



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-1-7 18:29:39
一点一点来吧——

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的结构
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2020-7-14 15:59:49
jyt1111 发表于 2013-10-15 16:52
各位大侠,有没有熟悉PVR(phylogenetic eigenvectors regression)包的啊?本人是R初学者,最近想做phylog ...
您好,我想用pvr程序包做气候因子和系统发育对植物物候期的影响,请问您会用pvr进行操作吗,例子里的环境变量就是输入单纯的一个向量,可以输入矩阵吗?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群