- left
Data frame of "left" units (e.g., treated, cases)
- right
Data frame of "right" units (e.g., control, controls)
- vars
Variable names to use for distance computation
- distance
Distance metric: "euclidean", "manhattan", "mahalanobis",
or a custom function
- weights
Optional named vector of variable weights
- scale
Scaling method: FALSE (none), "standardize", "range", or "robust"
- auto_scale
If TRUE, automatically check variable health and select
scaling method (default: FALSE)
- max_distance
Maximum allowed distance (pairs exceeding this are forbidden)
- calipers
Named list of per-variable maximum absolute differences
- block_id
Column name containing block IDs (for stratified matching)
- ignore_blocks
If TRUE, ignore block_id even if present
- require_full_matching
If TRUE, error if any units remain unmatched
- strategy
Greedy strategy:
"row_best": For each row, find best available column (default)
"sorted": Sort all pairs by distance, greedily assign
"pq": Use priority queue (good for very large problems)
- return_unmatched
Include unmatched units in output
- return_diagnostics
Include detailed diagnostics in output
- parallel
Enable parallel processing for blocked matching.
Requires 'future' and 'future.apply' packages. Can be:
FALSE: Sequential processing (default)
TRUE: Auto-configure parallel backend
Character: Specify future plan (e.g., "multisession", "multicore")
- check_costs
If TRUE, check distance distribution for potential problems
and provide helpful warnings before matching (default: TRUE)