dot-robust_scale: Robust scale estimate via MAD

.robust_scaleR Documentation

Robust scale estimate via MAD

Description

Computes the median absolute deviation with a fallback for zero or near-zero MAD (constant columns). In that case the inter-quartile range scaled to match the normal distribution is used. If both are zero, returns 1 so that standardized values remain unchanged.

Usage

.robust_scale(x)

Arguments

x

numeric vector (NAs are removed internally)

Value

positive numeric scalar

Author(s)

Matthias Templ


VIM documentation built on Sept. 2, 2026, 5:07 p.m.