我有一个数据集,其中包含每月采样的浮游动物数据。它始终针对同一采样点,因此不是空间上的,而是超过 10 年。我想使用 NMDS 图来查看 2014 年至 2024 年的浮游动物群落(三月、四月和五月期间)是否会使用 NMDS 分为不同的群落,但结果是拱形的。我可以解决这个问题吗?这些样本没有额外的环境变量。我使用了每个样本的总丰度(m-3)。
nmds <- metaMDS(dist_matrix, k = 2, trymax = 100)
stress_value<-nmds$stress
nmds_scores <- as.data.frame(scores(nmds))
nmds_scores$month <- Total_Abundance_Spring_Mero$Month
nmds_scores$year <- Total_Abundance_Spring_Mero$Year
# Plot NMDS
ggplot(nmds_scores, aes(x = NMDS1, y = NMDS2, color = factor(year), shape = factor(month))) +
geom_point(size = 3) +
labs(title = "Total abundance (m-3) of Meroplankton in Spring", x = "NMDS1", y = "NMDS2", color = "Year", shape = "Month") +
theme_classic()+
annotate("text", x = Inf, y = Inf, label = paste("Stress =", round(stress_value, 4)),
hjust = 1.1, vjust = 1.1, size = 5, color = "red")````
[Arch Shaped NMDS plot, shapes represent the month and color the year](https://i.sstatic.net/4aBN7ffL.png)
这是您未发布的代码部分的问题,或者是您的数据的问题。或者如何计算 dist_matrix。
如果我运行以下命令,我也会得到一个弧线。
library(vegan)
library(ggplot2)
Total_Abundance_Spring_Mero <- data.frame(
Month = sample(1:12, 100, replace = TRUE),
Year = sample(2010:2020, 100, replace = TRUE),
n1 = 1:100,
n2 = 1:100)
dist_matrix <- vegdist(Total_Abundance_Spring_Mero[, -c(1, 2)], method = "bray")
nmds <- metaMDS(dist_matrix, k = 2, trymax = 100)
stress_value<-nmds$stress
nmds_scores <- as.data.frame(scores(nmds))
nmds_scores$month <- Total_Abundance_Spring_Mero$Month
nmds_scores$year <- Total_Abundance_Spring_Mero$Year
# Plot NMDS
ggplot(nmds_scores, aes(x = NMDS1, y = NMDS2, color = factor(year), shape = factor(month))) +
geom_point(size = 3) +
labs(title = "Total abundance (m-3) of Meroplankton in Spring", x = "NMDS1", y = "NMDS2", color = "Year", shape = "Month") +
theme_classic()+
annotate("text", x = Inf, y = Inf, label = paste("Stress =", round(stress_value, 4)),
hjust = 1.1, vjust = 1.1, size = 5, color = "red")