Determine the threshold using Locally estimated or weighted Scatterplot Smoothing.
Source:R/thresholdopt.R
search_threshold.Rd
Determine the threshold using Locally estimated or weighted Scatterplot Smoothing.
Usage
search_threshold(
data,
outliers,
sp = NULL,
plot = FALSE,
var_col = NULL,
warn = FALSE,
verbose = FALSE,
colors = c("darkblue", "orange"),
useropt = 0.8
)
Arguments
- data
Dataframe
. The reference dataframe were absolute outliers will be removed.- outliers
datacleaner
. Datacleaner output with outliers flagged inmultidetect
function.- sp
string
. Species name or index if multiple species are considered during outlier detection.- plot
logical
. to show plot of loess fitted function with minima and maxima (optimal threshold and clean data).- var_col
string
. A column with species names ifdataset
for species is a dataframe not a list. Seepred_extract
for extracting environmental data.- warn
logical
. If TRUE, warning on whether absolute outliers obtained at a low threshold is indicated. Default TRUE.- verbose
logical
. If true, then messages about the outlier flagging will be displayed.- colors
vector
. Colors for both the true data and the loess fitted data lines.- useropt
numeric
The default is 0.8, to ensure that the loess maximum does not fall below user optima if it is not properly searched using the loess model.