knitr::opts_chunk$set(echo = FALSE) library(drake) library(dplyr) library(ggplot2) all_di <- read.csv(here::here("analysis", "reports", "all_di.csv"), stringsAsFactors = F) all_di <- all_di %>% mutate(log_nparts = log(gmp:::as.double.bigz(nparts)), log_nsamples = log(nsamples), log_s0 = log(s0), log_n0 = log(n0)) %>% filter(n0 != s0, s0 != 1, !singletons, n0 != (s0 + 1)) %>% mutate(dat = ifelse(grepl(dat, pattern = "fia"), "fia", dat), dat = ifelse(dat == "misc_abund_short", "misc_abund", dat)) %>% mutate(Dataset = dat, Dataset = ifelse(Dataset == "fia", "FIA", Dataset), Dataset = ifelse(Dataset == "bbs", "Breeding Bird Survey", Dataset), Dataset = ifelse(Dataset == "mcdb", "Mammal Communities", Dataset), Dataset = ifelse(Dataset == "gentry", "Gentry", Dataset), Dataset = ifelse(Dataset == "misc_abund", "Misc. Abundance", Dataset))
s3_fig2 <- gridExtra::grid.arrange(grobs = list( ggplot(filter(all_di, s0 > 2, nparts > 20), aes(x = log_nparts, y= skew_95_ratio_1t)) + geom_point(alpha = .1) + theme_bw() + xlim(0, 100) + ylim(0,1)+ xlab("Log number of elements in the feasible set") + ylab("Breadth index") + ggtitle("Breadth index (skewness)"), ggplot(filter(all_di, nparts > 20), aes(x = log_nparts, y= simpson_95_ratio_1t)) + geom_point(alpha = .1) + theme_bw() + xlim(0, 100) + ylim(0, 1)+ xlab("Log number of elements in the feasible set") + ggtitle("Breadth index (evenness)") + ylab("Breadth index") ), ncol = 2) pdf("figure_s5.pdf", bg = "white") plot(s3_fig2) dev.off()
Legend. The breadth index (defined as the ratio of the width of a one-tailed 95% density interval relative to the full range of a distribution) for the distributions of skewness and evenness obtained from the sampled feasible set declines as the number of elements in the feasible set increases. This indicates more narrow and well-resolved statistical baselines for large feasible sets.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.