winsorize_var() is a deprecated alias retained for backward compatibility.
New code should use apply_transformations() directly.
Arguments
- x
Numeric vector (the computed ratio, before any transformation).
- winsorize
Winsorization proportion between 0 and 1 (default
0.98, which clips at the 1st and 99th percentiles for"np"range).- offset
Sentinel offset applied to fixed bounds (default
0.001). Observations clipped to a fixed bound are stored asbound -- offsetso they remain identifiable in the_wcolumn.- range
Character string describing the theoretical range of the ratio. Controls how the lower and upper winsorization bounds are determined:
"np"Negative to positive (unbounded both directions). Winsorizes symmetrically at the
(1-winsorize)/2and1-(1-winsorize)/2percentiles. Default behaviour."zp"Zero to positive. The lower bound is fixed at
-offset(flagging truncated-at-zero values) and the upper bound is thewinsorizepercentile of the full distribution."zo"Zero to one. Both bounds are fixed (
-offsetand1+offset), flagging values outside[0, 1]. No percentile-based clipping is applied."nz"Negative to zero. The upper bound is fixed at
+offsetand the lower bound is the1-winsorizepercentile."lo;hi"Custom numeric range, e.g.
"0;10". The lower bound is fixed atlo - offsetand the upper bound athi + offset.
- normalize_type
Transformation type override passed to
find_best_normalization(). One ofNULL(auto-detect),"asinh","logit","rank_normal", or"hurdle". DefaultNULL.
Value
Same as apply_transformations().