我也不知道这是否有帮助,但您可以构建一个模拟器来测试渐近行为。例如,您可以建立一个人口:
population <- sample(size = 1e6, LETTERS[1:20],
replace = TRUE, prob = 1/(2:21)^2)
这表示您的种群中有 20 个物种并且概率正在减少(根据需要扩展)。
您可以模拟访问和有关您访问的信息。例如,您访问的样本有多大?在访问期间,您只能看到 1% 的热带雨林等。
sim_visits <- function(visits, percent_obs, population){
species_viewed <- vector()
unique_views <- vector()
for(i in 1:visits){
my_samp <- sample(x = population, size = round(percent_obs*length(population),0),
replace = FALSE)
species_viewed <- c(species_viewed, my_samp)
unique_views[i] <- length(unique(species_viewed))
}
new_observed <- unique_views - dplyr::lag(unique_views, 1, 0)
df <- data.frame(unique_views = unique_views, new_observed)
df$cummulative <- cumsum(unique_views)
df
}
然后你可以多次从模拟中得出结论,看看你得到了什么样的值分布。
sim_visits(9, percent_obs = .001, population = population)
unique_views new_observed cummulative
1 13 13 13
2 15 2 28
3 15 0 43
4 17 2 60
5 17 0 77
6 17 0 94
7 17 0 111
8 17 0 128
9 17 0 145
不知道这是否有帮助,但我发现模拟是概念化此类问题的好方法。