plot_bootstrap_results: Computes summary results of bootstrap simulations useful for...

View source: R/plot_goodness_of_fit.R

plot_bootstrap_resultsR Documentation

Computes summary results of bootstrap simulations useful for plotting

Description

The output is a list of results

Usage

plot_bootstrap_results(
  overall_results,
  sumstats = c(65, 5, 28, 1),
  ylim4 = 0.7,
  title = NULL
)

Arguments

overall_results

summary results obtained with summarize_bootstrap_results().

sumstats

vector with the number of species, number of colonization, size of the largest clade and the rank of the largest clade in the empirical data

ylim4

maximum of the plot of the rank of the largest clade.

title

title of the plot.

Author(s)

Rampal S. Etienne & Luis Valente

Examples

## Not run: 
clado_rate <- 0.5
ext_rate <- 0.2
carr_cap <- Inf
immig_rate <- 0.005
ana_rate <- 1
sim_pars <- c(clado_rate, ext_rate, carr_cap, immig_rate, ana_rate)
set.seed(1)

dataset_cs <- DAISIE::DAISIE_sim_cr(
  time = 10,
  M = 1000,
  pars = sim_pars,
  replicates = 10,
  plot_sims = FALSE,
  verbose = FALSE,
  divdepmodel = "CS"
)

dataset_iw <- DAISIE::DAISIE_sim_cr(
  time = 10,
  M = 1000,
  pars = sim_pars,
  replicates = 10,
  plot_sims = FALSE,
  verbose = FALSE,
  divdepmodel = "IW"
)
overall_results_cs <- DAISIEutils::summarize_bootstrap_results(
  daisie_data = dataset_cs
)
overall_results_iw <- DAISIEutils::summarize_bootstrap_results(
  daisie_data = dataset_iw
)
par(mfrow = c(2, 4), cex.lab = 1.5, cex.main = 1.5)
DAISIEutils::plot_bootstrap_results(
  overall_results = overall_results_cs,
  title = "Simulated under CS"
)
DAISIEutils::plot_bootstrap_results(
  overall_results = overall_results_iw,
  title = "Simulated under IW"
)

## End(Not run)

tece-lab/DAISIEutils documentation built on Jan. 31, 2024, 12:09 p.m.