# OPTc

OPTc computes breakdown point and efficiency associated with constant c for Optimal rho function

## Syntax

• bdp=OPTc(c, v)example
• bdp=OPTc(c, v, shapeeff)example
• [bdp,eff]=OPTc(___)example
• [bdp,eff,approxsheff]=OPTc(___)example

## Description

 bdp =OPTc(c, v) bdp associated with a particular c.

 bdp =OPTc(c, v, shapeeff) bdp and eff associated with a particular c.

 [bdp, eff] =OPTc(___) Breakdown vs efficiency.

 [bdp, eff, approxsheff] =OPTc(___) An example with 3 output arguments.

## Examples

expand all

### bdp associated with a particular c.

c=5;
bdp = OPTc(c,1)

### bdp and eff associated with a particular c.

c=5;
[bdp, eff] = OPTc(c,1)

### Breakdown vs efficiency.

%% Breakdown vs efficiency.
%Analysis of breakdown point and asymptotic efficiency
%at the normal distribution as a function of c in regression.
c=1:0.01:4;
CC=[c' zeros(length(c),1)];
jk=0;
for j=c
jk=jk+1;
[bdp,eff]=OPTc(j,1);
CC(jk,2:3)=[bdp,eff];
end
subplot(2,1,1)
plot(c',CC(:,2))
xlabel('c','Interpreter','Latex','FontSize',16)
ylabel('Breakdown point','Interpreter','none')
subplot(2,1,2)
plot(c',CC(:,3))
xlabel('c','Interpreter','Latex','FontSize',16)
ylabel('Asymptotic efficiency','Interpreter','none')

### An example with 3 output arguments.

c=5;
% third input argument is 1, that is shape efficiency
[bdp, eff, approxeff] = OPTc(c,2,1);

## Input Arguments

### c — tuning constant c. Scalar.

Scalar greater than 0 which controls the robustness/efficiency of the estimator

Data Types: single| double

### v — number of response variables. Scalar.

Number of variables of the dataset (for regression v=1)

Data Types: single| double

### shapeeff — location or shape efficiency. Scalar.

If shapeeff=1, the efficiency is referred to the shape else (default) is referred to the location estimator

Example: 1 

Data Types: double

## Output Arguments

### bdp —bdp. Scalar

Breakdown point associated to the supplied value of c

### eff —eff. Scalar

Efficiency associated to the supplied value of c

### approxsheff —Approximate value of efficiency. Scalar

Approximate value of efficiency in case input option shapeeff=1 and v>1.

This output is left for comparability with the value which comes out from R library robustbase.

$\rho$ ($\psi$) function which is considered is standardized using intervals 0---(2/3)c , (2/3)c---c, >c.

$\rho$ function is

$OPTrho(u)= \left\{ \begin{array}{lr} 1.3846 \left(\frac{u}{c}\right)^2 & |\frac{u}{c}| \leq \frac{2}{3} \\ 0.5514-2.6917 \left(\frac{u}{c}\right)^2 +10.7668\left(\frac{u}{c}\right)^4-11.6640\left(\frac{u}{c}\right)^6+4.0375\left(\frac{u}{c}\right)^8 & \qquad \frac{2}{3} \leq |\frac{u}{c}|\leq 1 \\ 1 & |\frac{u}{c}|>1 \\ \end{array} \right.$ |t/c|>1 Therefore, the input c for the (rho) psi function above corresponds to c/3 in the rho (psi) function defined in the interval 0---2c, 2c---3c, >3c

## References

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