Hampel et al. (1981) have introduced a rho function which
minimizes the asymptotic variance of the regression M-estimate, subject
to a bound on the supremum of the Change of Variance Curve of the
estimate. This leads to the Hyperbolic Tangent $\rho$
function, which, for suitable constants $c$, $k$, $A$, $B$ and
$d$, is defined as
\[
HYPrho(u) =
\left\{
\begin{array}{cc}
u^2/2 & |u| \leq d, \\
d^2/2 -2 \frac{A}{B} \log \left\{ \cosh \left[ 0.5 \sqrt{ \frac{(k - 1) B^2}{A} } (c - |u|) \right] \right\} & \\
+2 \frac{A}{B}\log \left\{ \cosh \left[ 0.5\sqrt{\frac{(k - 1) B^2}{A}}(c -d)\right] \right\} & \\
& d \leq |u| < c, \\
d^2/2 +2 \frac{A}{B} \log \left\{ \cosh \left[ 0.5 \sqrt{ \frac{(k - 1) B^2}{A} }(c -d) \right] \right\} &
|u| \geq c. \\
\end{array}
\right.
\]
where $0 < d < c$ is such that
\[
d = \sqrt{[A(k-1)]}\tanh [\frac{1}{2}\sqrt{\frac{(k-1)B^2}{A}}(c - d)],
\]
$A$ and $B$ satisfy suitable conditions, and $k$ is related to the bound
in the Change of Variance Curve.
More precisely, it is necessary to have $0 < A < B < 2 *normcdf(c)-1- 2*c*normpdf(c) <1$