# OPTrho

OPTrho computes rho function for optimal weight function

## Syntax

• rhoOPT=OPTrho(u, c)example

## Description

 rhoOPT =OPTrho(u, c) Plot of rho function.

## Examples

expand all

### Plot of rho function.

x=-6:0.01:6;
rhoOPT=OPTrho(x,2);
plot(x,rhoOPT)
xlabel('x','Interpreter','Latex')
ylabel('$\rho (x)$','Interpreter','Latex')

## Input Arguments

### u — scaled residuals or Mahalanobis distances. Vector.

n x 1 vector containing residuals or Mahalanobis distances for the n units of the sample

Data Types: single| double

### c — tuning parameter. Scalar.

Scalar greater than 0 which controls the robustness/efficiency of the estimator (beta in regression or mu in the location case ...)

Data Types: single| double

## Output Arguments

### rhoOPT —residuals after rho filter.  Vector

n x 1 vector which contains the Tukey's biweight rho associated to the residuals or Mahalanobis distances for the n units of the sample Function OPTrho transforms vector u as follows | (1/3.25*c^2) x^2/2 |x|<=2c | \rho(x,c) = | (1/3.25) * (1.792 - 0.972 * (x/c)^2 + 0.432 * (x/c)^4 - 0.052 * (x/c)^6 + 0.002 * (x/c)^8) 2c<=|x|<=3c | | 1 |x|>3c Remark: Yohai and Zamar (1997) showed that the $\rho$ function given above is optimal in the following highly desirable sense: the final M estimate has a breakdown point of one-half and minimizes the maximum bias under contamination distributions (locally for small fraction of contamination), subject to achieving a desidered nominal asymptotic efficiency when the data are Gaussian.

## References

Maronna, R.A., Martin D. and Yohai V.J. (2006), "Robust Statistics, Theory and Methods", Wiley, New York.

Riani, M., Cerioli, A. and Torti, F. (2014), On consistency factors and efficiency of robust S-estimators, "TEST", Vol. 23, pp. 356-387.

Yohai V.J., Zamar R.H. (1997) Optimal locally robust M-estimates of regression. "Journal of Planning and Statistical Inference", Vol. 64, pp. 309-323.