Description Usage Arguments Value Examples
quantile_ci
Estimates CIs around a quantile percentile estimate using
non-parametric bootstrapping from the boot package
1 2 3 4 5 6 7 | quantile_ci(
observations,
percentile,
bootstraps = 1e+05,
conf = 0.95,
type = "perc"
)
|
observations |
A vector of observations given as numeric values |
percentile |
The percentile of interest |
bootstraps |
The number of bootstraps you want to run to create the CIs, defaults to 100000 |
conf |
The confidence level wanted. Defaults to 95% CI. |
type |
A vector of character strings representing the type of intervals required to calculate the CI. Defaults to "bca". See ??boot.ci for more information. |
The quantile estimate and confidence intervals.
1 2 3 4 5 6 7 8 9 10 11 | # Gather sightings of iNaturalist observations for four species:
# Danaus plexippus, Speyeria cybele, Rudbeckia hirta, and Asclepias syriaca
# Estimate when the first 10 percent of individuals of the butterfly species
# Speyeria cybele are in flight.
data(inat_examples)
s_cybele <- subset(inat_examples, scientific_name == "Speyeria cybele")
quantile_ci(observations = s_cybele$doy, percentile = 0.1, bootstraps = 100)
# note low number of bootstraps for quick processing speed
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.