【问题标题】:R vegan CCA, determine which constraints were aliased?R vegan CCA,确定哪些约束是别名的?
【发布时间】:2023-04-08 15:31:01
【问题描述】:

我已经使用 vegan 执行了 CCA,并使用双标箭头绘制。 “ca”输出告诉我“一些约束被别名,因为它们是共线的(冗余)”。我理解这意味着约束被删除,因为它们是多余的。

ca<-cca(CCA_data[3:4567]~.,data=Meta_data_2)
ca

我也可以列出别名没问题:

alias(ca, names=TRUE,complete=TRUE)

但是,我如何确定哪些约束存在别名或与其他因素共线。我需要知道哪些因素与哪些因素是多余的,这样我才能重新考虑我的方法。

这又给了我列出的别名,但没有双标值。虽然这里的第二行给了我 biplot 值,但是缺少别名的值...

ca$CCA$alias
ca$CCA$biplot

有关如何从“ca”获取该信息的建议会很有帮助。

**更新:

Model :
CCA_data[3:4567] ~ `Assimilatory nitrate reduction, nitrate => ammonia` + 
    `beta-Oxidation` + `beta-Oxidation, acyl-CoA synthesis` + 
    `Citrate cycle (TCA cycle, Krebs cycle)` + `Dissimilatory nitrate reduction, nitrate => ammonia` + 
    `Fatty acid biosynthesis, elongation` + `Fatty acid biosynthesis, elongation, endoplasmic reticulum` + 
    `Fatty acid biosynthesis, elongation, mitochondria` + `Fatty acid biosynthesis, initiation` + 
    `Gluconeogenesis, oxaloacetate => fructose-6P` + `Glycolysis (Embden-Meyerhof pathway), glucose => pyruvate` + 
    `Glyoxylate cycle` + `Nitrate assimilation` + Photorespiration + 
    `Photosystem I` + `Photosystem II` + `Pyruvate oxidation, pyruvate => acetyl-CoA` + 
    `Reductive citrate cycle (Arnon-Buchanan cycle)` + `Reductive pentose phosphate cycle (Calvin cycle)` + 
    `Urea cycle`

Complete :
                                                   `Assimilatory nitrate reduction, nitrate => ammonia`
`Photosystem I`                                      1.23566                                           
`Photosystem II`                                    -0.64830                                           
`Pyruvate oxidation, pyruvate => acetyl-CoA`        -0.40986                                           
`Reductive citrate cycle (Arnon-Buchanan cycle)`    22.01804                                           
`Reductive pentose phosphate cycle (Calvin cycle)`  16.10217                                           
`Urea cycle`                                         1.55773                                           
                                                   `beta-Oxidation`
`Photosystem I`                                      0.24919       
`Photosystem II`                                     1.20864       
`Pyruvate oxidation, pyruvate => acetyl-CoA`        -0.24875       
`Reductive citrate cycle (Arnon-Buchanan cycle)`    -1.84576       
`Reductive pentose phosphate cycle (Calvin cycle)`  -0.74552       
`Urea cycle`                                         5.03302       
                                                   `beta-Oxidation, acyl-CoA synthesis`
`Photosystem I`                                      0.08856                           
`Photosystem II`                                     1.19711                           
`Pyruvate oxidation, pyruvate => acetyl-CoA`         0.39169                           
`Reductive citrate cycle (Arnon-Buchanan cycle)`     0.23713                           
`Reductive pentose phosphate cycle (Calvin cycle)`  -6.34640                           
`Urea cycle`                                        -1.88670                           

^以上已被缩短

【问题讨论】:

    标签: r syntax vegan


    【解决方案1】:

    该信息由alias 命令提供。这是一个可重现的例子:

    library(vegan)
    data(dune, dune.env)
    m <- rda(dune ~ ., dune.env)
    ## the following gives the names of aliased variables
    alias(m, names=TRUE)
    # [1] "Manure^4"
    ## the following gives the aliasing equation
    alias(m)
    Complete :
         A1 Moisture.L Moisture.Q Moisture.C ManagementHF ManagementNM ManagementSF Use.L Use.Q Manure.L  Manure.Q  Manure.C 
    Manure^4                                              8.366600                              5.291503 -4.472136  2.645751
    

    输出很宽,但是当我们有ManagementNM 时,它告诉Manure 的一级是完全别名的。通过交叉制表可以轻松识别更多细节:

    with(dune.env, table(Management, Manure))
              Manure
    Management 0 1 2 3 4
            BF 0 2 1 0 0
            HF 0 1 2 2 0
            NM 6 0 0 0 0
            SF 0 0 1 2 3
    

    当我们有Management 级别NM 时,我们只有Manure 级别0,并且`Manure 的最后 级别将被别名。

    【讨论】:

    • 谢谢贾里。沙丘的例子是有道理的。但是我对更大的数据集有点困惑。 alias(ca) 输出为我提供了一个很长的列表,其中列出了我输入的每个变量以及下面列出的所有别名变量以及数字。我如何辨别什么是别名?此处示例:
    猜你喜欢
    • 1970-01-01
    • 2012-12-12
    • 1970-01-01
    • 2015-10-20
    • 1970-01-01
    • 1970-01-01
    • 2011-06-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多