weib_percentile: Calculating a percentile estimate of a seasonal abundance...

Description Usage Arguments Value Examples

View source: R/weib_percentile.R

Description

weib_percentile uses empirical bootstrapping to estimate a percentile of the Weibull distribution, given random variables.

Usage

1
weib_percentile(observations, percentile, iterations = 500)

Arguments

observations

is a vector of dates/time of observations given as integers

percentile

is the percentile of the cumulative distribution function of interest

iterations

is the number of iterations you want to use to bootstrap an estimate of bias of the original CDF. The bias is used to calculate a Weibull-corrected estimate of the percentile bound.

Value

The Weibull-corrected estimate of the percentile of interest.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Gather sightings of iNaturalist observations for four species:
# Danaus plexippus, Speyeria cybele, Rudbeckia hirta, and Asclepias syriaca

# Estimate when the first 50 percent of individuals of the milkweed species
# Asclepias syriaca have been observed.

data(inat_examples)
a_syriaca <- subset(inat_examples, scientific_name == "Asclepias syriaca")
weib_percentile(a_syriaca$doy, percentile = 0.5, iterations = 500)

# Estimate when 90 percent of individuals of the milkweed species A. syriaca
# have been observed, using only 100 iterations for quicker processing. To
# get a more stable result, more iterations should be used.

weib_percentile(a_syriaca$doy, percentile = 0.9, iterations = 100)

phenesse documentation built on July 29, 2020, 1:06 a.m.