quantile_ci {phenesse} | R Documentation |
Calculating the confidence intervals (CIs) of a quantile estimate of a a vector of observations using non-parametric bootstrapping.
Description
quantile_ci
Estimates CIs around a quantile percentile estimate using
non-parametric bootstrapping from the boot package
Usage
quantile_ci(
observations,
percentile,
bootstraps = 1e+05,
conf = 0.95,
type = "perc"
)
Arguments
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. |
Value
The quantile estimate and confidence intervals.
Examples
# 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
[Package phenesse version 0.1.2 Index]