Skip to contents

This function processes catch data to identify outliers in the number of elements and weight of the catch. It utilizes the LocScaleB method with the MAD method for outlier detection, where k determines the bounds extension. The function selects and transforms relevant data, groups it, and applies outlier detection based on the specified k_max_nb and k_max_weight thresholds.

Usage

validate_catch(data = NULL, k_max_nb = NULL, k_max_weight = NULL)

Arguments

data

A data frame containing catch information, including columns _id, gear_type, and catch.

k_max_nb

Nonnegative constant used in the MAD method for determining bounds in outlier detection for the number of elements. Common values are 2, 2.5, and 3.

k_max_weight

Nonnegative constant used in the MAD method for determining bounds in outlier detection for the weight. Common values are 2, 2.5, and 3.

Value

A data frame with the original catch data, additional columns for detected outliers, and nested catch data.

Examples

if (FALSE) { # \dontrun{
# Assuming you have a data frame `catch_data` with the necessary structure:
validated_catch <- validate_catch(data = catch_data, k_max_nb = 10, k_max_weight = 100)
} # }