Description Usage Arguments Value Examples

View source: R/weib_percentile_ci.R

`weib_percentile_ci`

uses non-parametric bootstrapping
from the boot package to estimate 95

1 2 3 4 5 6 7 8 9 10 11 | ```
weib_percentile_ci(
observations,
iterations,
percentile,
bootstraps,
type = "perc",
conf = 0.95,
parallelize = "no",
ncpus = getOption("boot.ncpus", 1L),
cl = NULL
)
``` |

`observations` |
is a vector of dates/time of observations given as numeric values |

`iterations` |
is the number of iterations you want to run to create empirical bootstrapping to estimate bias of original CDF. The bias is used to calculate a bias corrected estimate of the percentile bound. |

`percentile` |
is the percentile of the cumulative distribution function of interest |

`bootstraps` |
is the number of bootstraps you want to run to create the CIs |

`type` |
A vector of character strings representing the type of intervals required to calculate the CI. Defaults to "perc". See ??boot.ci for more information. |

`conf` |
The confidence level wanted. Defaults to 95% CI. |

`parallelize` |
The type of parallel operation to be used (if any). If missing, the default is that no parallelization will occur. Parallelization options are "multicore" and "snow" |

`ncpus` |
An integer that represents the number of processes to be used in parallel operation. |

`cl` |
An optional parallel or snow cluster for use if parallel = "snow". If not supplied, a cluster on the local machine is created for the duration of the boot call. |

The Weibull-corrected estimate of the percentile of interest and CIs.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
# 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 butterfly species
# Speyeria cybele are in flight. Note, only 10 iterations are beingg used
# in this example to keep computation time low, but more iterations should
# be used to get a more stable result. See vignette for parallelization
# options.
data(inat_examples)
s_cybele <- subset(inat_examples, scientific_name == "Speyeria cybele")
weib_percentile_ci(observations = s_cybele$doy, iterations = 10,
percentile = 0.5, bootstraps = 100)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.