robloc(y, eff=.96, resid=T, iterh=4, iterb=1)
sum(psi( (y-mu)/s )) = 0.
When the scale parameter s is also unknown, one estimation scheme is Huber's Proposal 2. This solves the equation above simultaneously with
sum(psi( (y-mu)/s )^2) = beta,
where beta depends on psi. This system of equations is usually solved iteratively.
A Huber psi function of x is equal to x when abs(x) is less than the tuning constant c and is equal to c times the sign of x otherwise. A bisquare psi function of x equals x * (c^2 - x^2)^2 when abs(x) < c, and equals 0 otherwise. Least squares corresponds to psi of x equal to x. Thus, the Huber psi down-weights outliers and the bisquare entirely ignores data that are extreme outliers.
The robloc algorithm first performs iterh iterations with the Huber psi, then iterb iterations with the bisquare psi. If iterh = iterb = 0, then the median and the MAD are the location and scale estimates.
Huber, P. J. (1981). Robust Statistics. Wiley, New York.
robloc(car.miles, resid=F)