上文
WR: 评估中国46个饮用水供应系统的水源水对自来水细菌群落的影响
提到了Procrustes test,本文简要说明一下。
该方法来自于2001年一篇文章,目前引用655次。
Link: https://link.springer.com/article/10.1007/s004420100720
Procrustes test比较两组数据的相似性,可作为Mantel test的替代。
文章结果表明,Procrustes test的效果等于或优于Mantel test。
Procrustes通过将一个矩阵旋转到与目标矩阵的最大相似度,从而最小化差异的平方和。
在R中vegan包可以简单实现。
1##Protest: Procrustes test 2 3library(vegan) 4 5procrustes(X, Y, scale = TRUE, symmetric = FALSE, scores = "sites", ...) 6X:目标矩阵 7Y:要变换的矩阵 8scale:允许缩放Y轴 9 10#protest是procrustes增强的函数,结果包含内容更多。 11data(varespec) 12vare.dist <- vegdist(wisconsin(varespec)) 13mds.null <- monoMDS(vare.dist, y = cmdscale(vare.dist)) 14mds.alt <- monoMDS(vare.dist) 15#用以上两个矩阵进行procrustes 16vare.proc <- protest(mds.alt, mds.null) 17vare.proc 18 19Call: 20protest(X = mds.alt, Y = mds.null) 21 22Procrustes Sum of Squares (m12 squared): 0.2575 23Correlation in a symmetric Procrustes rotation: 0.8617 24Significance: 0.001 25Permutation: free 26Number of permutations: 999 27 28#0.8617 为相关性 29#0.001为显著性 30 31plot(vare.proc)跟文章中的图形式一样~~
其他Reference
http://jackson.eeb.utoronto.ca/procrustes-analysis/
http://mb3is.megx.net/gustame/other-methods/procrustes-analysis
http://blog.sina.com.cn/s/blog_b5c8908c0101e8ox.html
END
---来自腾讯云社区的---生物信息知识分享
微信扫一扫打赏
支付宝扫一扫打赏