The location estimator \(T_n\) is the solution to the
M-estimating equation
$$\frac{1}{n}\sum_{i=1}^{n}\psi_{\mathrm{log}}
\!\left(\frac{x_i - T_n}{S_n}\right) = 0$$
where \(S_n\) is a fixed auxiliary scale estimate and
\(\psi_{\mathrm{log}}\) is the logistic psi function (Rousseeuw &
Verboven 2002, Eq. 23):
$$\psi_{\mathrm{log}}(x) = \frac{e^x - 1}{e^x + 1}
= \tanh(x/2)$$
This function is bounded in \((-1, 1)\), smooth (\(C^\infty\)),
and strictly monotone. Boundedness provides robustness against outliers;
smoothness avoids the corner artifacts of Huber's \(\psi\) at small
\(n\).
Iteration scheme.
The estimating equation is solved by Newton--Raphson iteration. The
derivative of the logistic psi satisfies \(\psi'(x) =
1 - \psi^2(x)\), so the Newton step requires
no additional transcendental function evaluations beyond those already
computed for the numerator. Starting value:
\(T^{(0)} = \mathrm{med}(x)\). Auxiliary scale:
\(S = \mathrm{MAD}(x)\) unless scale is supplied.
Decoupled estimation.
Location and scale are estimated separately: robLoc holds the
auxiliary scale fixed at \(\mathrm{MAD}(x)\) throughout
iteration, following the decoupled approach of Rousseeuw & Verboven (2002,
Sec. 4.1). This avoids the positive-feedback instability of
simultaneous location--scale iteration (Huber's Proposal 2) in small
samples.
Fallback.
When the sample is too small for reliable iteration the function returns
the median directly: