Skip to contents

This function generates a user message explaining the MAD filtering process.

Usage

get_mad_user_message(var, x, left_threshold, keep)

Arguments

var

The name of the metric used for filtering.

x

Vector of values used for filtering.

left_threshold

The left threshold for filtering.

keep

Whether to keep "top" or "low" observations.

Value

A message explaining the MAD filtering process.

Examples

# Generate user message for MAD filtering with top fitting observations
get_mad_user_message("AIC", c(100, 200, 300), 150, "top")
#> Based on the specified metric (AIC) and the MAD filtering method, the following selection criteria were applied:
#> 1. The MAD-based threshold for considering outliers was calculated.
#> 2. Values above the threshold were identified, threshold: 150
#> 3. Summary of selection:
#> - 2 out of 3 observations had values above the threshold for the AIC metric.

# Generate user message for MAD filtering with low fitting observations
get_mad_user_message("BIC", c(50, 75, 100), 75, "low")
#> Based on the specified metric (BIC) and the MAD filtering method, the following selection criteria were applied:
#> 1. The MAD-based threshold for considering outliers was calculated.
#> 2. Values bellow the threshold were identified, threshold: 75
#> 3. Summary of selection:
#> - 1 out of 3 observations had values bellow the threshold for the BIC metric.