Preprocess matching variables with automatic checks and scaling
Source:R/matching_preprocessing.R
preprocess_matching_vars.RdMain preprocessing function that orchestrates variable health checks, categorical encoding, and automatic scaling selection.
Usage
preprocess_matching_vars(
left,
right,
vars,
auto_scale = TRUE,
scale_method = "auto",
check_health = TRUE,
remove_problematic = TRUE,
verbose = TRUE
)Arguments
- left
Data frame of left units
- right
Data frame of right units
- vars
Character vector of variable names
- auto_scale
Logical, whether to perform automatic preprocessing (default: TRUE)
- scale_method
Scaling method: "auto", "standardize", "range", "robust", or FALSE
- check_health
Logical, whether to check variable health (default: TRUE)
- remove_problematic
Logical, automatically exclude constant/all-NA variables (default: TRUE)
- verbose
Logical, whether to print warnings (default: TRUE)
Value
A list with class "preprocessing_result" containing:
left: Preprocessed left data frameright: Preprocessed right data framevars: Final variable names (after exclusions)health: Variable health diagnosticsscaling_method: Selected scaling methodexcluded_vars: Variables that were excludedwarnings: List of warnings issued