threshold_select: 'threshold_select' uses the first derivative of a kernel...

View source: R/threshold_select.R

threshold_selectR Documentation

threshold_select uses the first derivative of a kernel density function to estimate a threshold level at which to exclude casts with archival tag orientation errors.

Description

threshold_select uses the first derivative of a kernel density function to estimate a threshold level at which to exclude casts with archival tag orientation errors.

Usage

threshold_select(
  vals,
  method = "kernel",
  bandwidth.select = "ICV",
  mode.adjust = -0.1,
  make.plots = T,
  silent = T
)

Arguments

vals

Numeric vector of values

method

A character vector of length one indicating which automatic threshold detection method to use. Currently only accepts "kernel" for derivative of kernel density

bandwidth.select

A vector of length one indicating which bandwidth select method to use. Currently available options are "UCV" (default), "OSCV, and "nrd0" See Details below.

mode.adjust

A numeric vector of length one which adjusts the reference level for the mode for cases where the density function and derivative of the density function use different bandwidths. Default value generally should not be adjusted -0.1.

make.plots

Logical vector indicating if diagnostic plots should be generated.

Details

bandwidth.select method can be one of unbiased cross-validation (UCV) implemented in the kedd package, one-sided cross validation (OSCV) implemented in the OSCV package, or the rule-of-thumb method implemented in stats::bandwidth ("nrd0").

Value

Returns a list which includes a threshold indicating the estimated level for incorrect archival tag orientation, bandwidth for the kernel density function (h.0), bandwidth for the derivative of the kernel density function (h.1), and the proportion of data excluded by the threshold (omit.rate)

Author(s)

Sean Rohan sean.rohan@noaa.gov

References

Jones, M. C., Marron, J. S. and Sheather, S. J. (1996). A brief survey of bandwidth selection for density estimation. Journal of the American Statistical Association, 91, 401–407.

Savchuk, O.Y. (2017). One-sided cross-validation for nonsmooth density functions, arXiv:1703.05157.

Savchuk, O.Y., Hart, J.D., and Sheather, S.J. (2010). Indirect cross-validation for density estimation. Journal of the American Statistical Association. 105, 415-423. doi: 10.1198/jasa.2010.tm08532

Scott, D.W. and George, R. T. (1987). Biased and unbiased cross-validation in density estimation. Journal of the American Statistical Association, 82, 1131–1146.

Silverman, B. W. (1986) Density Estimation. London: Chapman and Hall.


sean-rohan/trawllight documentation built on Jan. 13, 2023, 10:43 p.m.