找到物种积累曲线到达渐近线的位置

Find where species accumulation curve reaches asymptote

我已经使用 specaccum() 命令为我的样本制定了物种积累曲线。

这是一些示例数据:

site1<-c(0,8,9,7,0,0,0,8,0,7,8,0)
site2<-c(5,0,9,0,5,0,0,0,0,0,0,0)
site3<-c(5,0,9,0,0,0,0,0,0,6,0,0)
site4<-c(5,0,9,0,0,0,0,0,0,0,0,0)
site5<-c(5,0,9,0,0,6,6,0,0,0,0,0)
site6<-c(5,0,9,0,0,0,6,6,0,0,0,0)
site7<-c(5,0,9,0,0,0,0,0,7,0,0,3)
site8<-c(5,0,9,0,0,0,0,0,0,0,1,0)
site9<-c(5,0,9,0,0,0,0,0,0,0,1,0)
site10<-c(5,0,9,0,0,0,0,0,0,0,1,6)
site11<-c(5,0,9,0,0,0,5,0,0,0,0,0)
site12<-c(5,0,9,0,0,0,0,0,0,0,0,0)
site13<-c(5,1,9,0,0,0,0,0,0,0,0,0)

species_counts<-rbind(site1,site2,site3,site4,site5,site6,site7,site8,site9,site10,site11,site12,site13)

accum <- specaccum(species_counts, method="random", permutations=100)

plot(accum)

为了确保我有足够的采样,我需要确保物种积累图的曲线达到渐近线,定义为最后两点之间的斜率 <0.3(站点 12 和 13 之间的 ei) .

results <- with(accum, data.frame(sites, richness, sd))

产生这个:

 sites richness        sd
1      1     3.46 0.9991916
2      2     4.94 1.6625403
3      3     5.94 1.7513054
4      4     7.05 1.6779918
5      5     8.03 1.6542263
6      6     8.74 1.6794660
7      7     9.32 1.5497149
8      8     9.92 1.3534841
9      9    10.51 1.0492422
10    10    11.00 0.8408750
11    11    11.35 0.7017295
12    12    11.67 0.4725816
13    13    12.00 0.0000000

我觉得我快到了。我可以生成一个具有站点 vs 丰富度的 lm,并提取站点 12 和 13 之间的确切斜率(切线?)。要在这里搜索更长的时间。

稍微简化您的数据生成过程:

species_counts <- matrix(c(0,8,9,7,0,0,0,8,0,7,8,0,
5,0,9,0,5,0,0,0,0,0,0,0, 5,0,9,0,0,0,0,0,0,6,0,0,
5,0,9,0,0,0,0,0,0,0,0,0, 5,0,9,0,0,6,6,0,0,0,0,0,
5,0,9,0,0,0,6,6,0,0,0,0, 5,0,9,0,0,0,0,0,7,0,0,3,
5,0,9,0,0,0,0,0,0,0,1,0, 5,0,9,0,0,0,0,0,0,0,1,0,
5,0,9,0,0,0,0,0,0,0,1,6, 5,0,9,0,0,0,5,0,0,0,0,0,
5,0,9,0,0,0,0,0,0,0,0,0, 5,1,9,0,0,0,0,0,0,0,0,0),
byrow=TRUE,nrow=13)

在 运行 随机化测试之前 set.seed() 总是一个好主意(让我们知道 specaccumvegan 包中):

set.seed(101)
library(vegan)
accum <- specaccum(species_counts, method="random", permutations=100)

从返回的对象中提取 richnesssites 分量并计算 d(richness)/d(sites) (请注意,斜率向量比原点 site/richness 向量短一个元素: 如果您尝试将斜坡与特定数量的站点匹配,请小心)

(slopes <- with(accum,diff(richness)/diff(sites)))
## [1] 1.45 1.07 0.93 0.91 0.86 0.66 0.65 0.45 0.54 0.39 0.32 0.31

在这种情况下,斜率实际上从未低于 0.3,因此此代码用于查找斜率第一次低于 0.3 的时间:

which(slopes<0.3)[1]

returns NA.