【发布时间】:2012-12-12 19:02:41
【问题描述】:
在我的 RDA 三图中,我想显示“站点”、“物种”及其约束条件,在我的例子中是 Field 和 Trt。问题是并非所有级别的约束都显示在图中。每个因素有两个水平。
我的 RDA 代码是:
Dummy.rda <- rda(species.rda ~ Field + Trt,RDA.env, scale=TRUE)
summary(Dummy.rda, scaling=3) #Here I see only one level of each reported in:Biplot scores for constraining variables. However all levels appear in: Centroids for factor constraints
anova.cca(Dummy.rda, step=100, by='margin') # degrees of freedom are correct for both factors (df=1)
plot(Dummy.rda, scaling = 3) #This displays all levels of Field and Trt but only one of each has an arrow
plot(Dummy.rda, display = "species", xlim = xlims, ylim = ylims,
scaling = 3)
text(Dummy.rda, scaling = 3, display = "bp") # I want to customize the RDA plot, but this 'text' only displays 1 level of each of Field and Trt.
【问题讨论】:
-
问题是关于文本功能?如果是,你能展示你想要绘制什么或你的数据样本来重现它吗?
-
在您的最后一次短信通话中尝试
display = 'cn'。这将绘制因子质心而不是箭头。 -
问题是为什么没有显示所有级别的约束。上面的代码正确显示了“站点”和“物种”,我想使用 text() 添加箭头来表示环境约束。在我的例子中,Trt 有 2 个级别,Field 有 2 个级别,但是上面的脚本在三图上只显示了一个级别。
-
@SteveCrittenden 很抱歉来晚了,但您看到的是回归中管理因子变量的标准方式。必须删除从该因子创建的虚拟变量之一,因为它线性依赖于其他虚拟变量。因此,我们必须将其作为显式变量排除在分析之外——包括其影响。有关更详细的讨论/解释,请参阅我的答案。
标签: r constraints rda vegan triplot