This function analyzes all numeric columns in the dataset and identifies extreme outliers
using the interquartile range (IQR) method. An extreme outlier is defined as a value that
is more than 3 times the IQR below Q1 or above Q3.
Usage
emii_find_outliers(
data,
iqr_multiplier = 3,
save_excel = FALSE,
excel_path = NULL
)
Arguments
- data
A tibble containing EMBRACE-II data
- iqr_multiplier
Numeric; multiplier for IQR to define outlier threshold (default: 3)
- save_excel
Logical; if TRUE, saves the outliers as an Excel file
- excel_path
Character; path where to save the Excel file (default: NULL)
Value
A tibble containing outlier information (embrace_id, variable, value, threshold, median)
Examples
if (FALSE) { # \dontrun{
clean_data <- emii_get_clean_data()
outliers <- emii_find_outliers(clean_data)
outliers <- emii_find_outliers(clean_data, save_excel = TRUE)
} # }