美文网首页
Mantel test分析,Partial Mantel Tes

Mantel test分析,Partial Mantel Tes

作者: Thinkando | 来源:发表于2019-08-18 16:22 被阅读0次

    Mantel test分析

    Mantel test是对两个矩阵相关关系的检验,总的来说,它是两个不同总体之间的相关关系,多用于生态学上。Mantel test用于计算环境因子和微生物群落数据的相关性,是对两个矩阵相关关系的检验。

    检验过程如下:两个矩阵都对应展开,变量两列,计算相关系数(理论上什么相关系数都可以计算,但常用pearson相关系数),然后其中一列或两列同时置换,再计算一个值,permutation 成千上万次,看实际的r值在所得r值分布中的位置,如果跟随机置换得到的结果站队较近,则不大相关,如果远远比随机由此得到显著性。

    https://www.rdocumentation.org/packages/ape/versions/5.3/topics/mantel.test

    > library(ape)
    > q1 <- matrix(runif(36), nrow = 6)
    > q2 <- matrix(runif(36), nrow = 6)
    > diag(q1) <- diag(q2) <- 0
    > mantel.test(q1, q2, graph = TRUE,
    +             main = "Mantel test: a random example with 6 X 6 matrices
    +             representing asymmetric relationships",
    +             xlab = "z-statistic", ylab = "Density",
    +             sub = "The vertical line shows the observed z-statistic")
    $z.stat
    [1] 4.170026
    
    $p # 离4.5比较接近,不显著
    [1] 0.167
    
    $alternative
    [1] "two.sided"
    
    > q1
              [,1]      [,2]      [,3]      [,4]      [,5]       [,6]
    [1,] 0.0000000 0.6232704 0.9042822 0.7381528 0.1812780 0.06214258
    [2,] 0.3550926 0.0000000 0.1305461 0.1038310 0.4537657 0.41203360
    [3,] 0.2834580 0.7030067 0.0000000 0.2630447 0.6984424 0.87124049
    [4,] 0.1160266 0.3934080 0.6204847 0.0000000 0.9386117 0.36235145
    [5,] 0.9894283 0.7557972 0.3767557 0.9784605 0.0000000 0.88097773
    [6,] 0.1359565 0.6406421 0.8330593 0.6336816 0.8586553 0.00000000
    > q2
              [,1]      [,2]      [,3]      [,4]      [,5]       [,6]
    [1,] 0.0000000 0.3733311 0.3725193 0.3936419 0.6272589 0.50564721
    [2,] 0.9326683 0.0000000 0.6480045 0.2044845 0.9006671 0.71997815
    [3,] 0.7754133 0.7901256 0.0000000 0.9066695 0.3723995 0.02206005
    [4,] 0.9313913 0.1281588 0.3549200 0.0000000 0.7657200 0.61318800
    [5,] 0.5141237 0.2160683 0.9245053 0.1916546 0.0000000 0.99952743
    [6,] 0.3536605 0.4187234 0.5716203 0.3210655 0.5769362 0.00000000
    
    image.png

    http://www.zilhua.com/1383.html

    Mantel test分析

    Mantel test 是检验两个矩阵相关关系的非参数统计方法,由 Nathan Mantel [20,37]于 1967 年 出并发表。Manteltest 多用在生态学上,用来检验群落距离矩阵(如 Bray-Curtis distance matrix)和环境变量距离矩阵(如 pH, 温度 或者地理位置的差异矩阵)之间的相关性(Spearman 系数等)。该方法的好处是不管什么样的数据,只要能计 算有距离属性的值,都可以转化为距离矩阵进行分析。


    image.png

    Partial Mantel Test 分析

    Partial Mantel Test 被用来检测在控制矩阵 C 的情况下,A 和 B 矩阵的相关性,也就是在 Mantel test 测试的基础上添加了第三个“控制”矩阵。Partial Mantel test[21]在控制矩阵 C(如生态距离矩阵,即 pH,温度或者地理位置等的差异矩阵)的效应下,来检验矩阵 A(如细菌群落、基因或功能等距离矩阵等)的残留变异是否和矩阵 B(如 噬菌体群落、基因或功能等距离矩阵等)相关。一般只要能计算有距离属性的值,都可以转化为距离(如 Bray-Curtis 等)矩阵进行分析。该分析输入 2 个数值型矩阵,第三个控制矩阵可通过选择因子(如环境因子的表头)来确定 的。


    image.png

    (Partial) Mantel correlogram 分析

    (Partial) Mantel correlogram 基于(Partial) mantel test 对空间相关的评估和检验,计算样方相异矩阵与样方距离等级矩阵,即样方的环境距离矩阵(默认为欧氏距离)和样方的微生物距离等级矩阵的标准化 mantel 相关系数 rm,每个距离等级均可以计算一个 rm,每个 rm 都可以用置换检验进行检验,并进行校正。Mantel correlogram 表 明在不同微生物距离等级下,环境与微生物群落是否存在空间相关性。当一个对样品与环境相关关系造成较大干 扰的环境因子存在时,可以选用 Partial Mantel correlogram 来减弱其影响。所以使用 Partial Mantel correlogram 时, 还需要 供该环境因子的数据。


    image.png

    相关文章

      网友评论

          本文标题:Mantel test分析,Partial Mantel Tes

          本文链接:https://www.haomeiwen.com/subject/lenrsctx.html