# HYPbdp

HYPbdp finds constant c which is associated to the requested breakdown point for hyp. tan. estimator

## Syntax

• c=HYPbdp(bdp, v)example
• c=HYPbdp(bdp, v,k)example
• c=HYPbdp(bdp, v,k,traceiter)example
• [c,A]=HYPbdp(___)example
• [c,A,B]=HYPbdp(___)example
• [c,A,B,d]=HYPbdp(___)example

## Description

 c =HYPbdp(bdp, v) HYPbdp with all default options.

 c =HYPbdp(bdp, v, k) Find value of c, A, B, for fixed break down point.

 c =HYPbdp(bdp, v, k, traceiter) Find value of c, A, B, for fixed break down point.

 [c, A] =HYPbdp(___) Efficienty monitoring.

 [c, A, B] =HYPbdp(___) Analysis of efficiency as a function of k =sup CVC.

 [c, A, B, d] =HYPbdp(___) Example of use of option traceiter.

## Examples

expand all

### HYPbdp with all default options.

Find required value of c when k=4.5 and bdp=0.5.

c=HYPbdp(0.5,1);

### Find value of c, A, B, for fixed break down point.

Find required values when k=4.5 and bdp=0.5.

[c,A,B,d]=HYPbdp(0.5,1);
% In this case
% c = 2.010311082005501
% A = 0.008931591866092
% B = 0.051928487236632
% d=  0.132017481327058

### Find value of c, A, B, for fixed break down point.

Find required values when k=4.5 and bdp=0.5.

ktuning=4.2;
[c,A,B,d]=HYPbdp(0.5,1,ktuning);
% In this case
% c =  2.093345907330513
% A = 0.002411382994023
% B = 0.026962054035832
% d=  0.066725444793702

### Efficienty monitoring.

Analysis of efficiency and of paramters A, B abd k as function of bdp for a given value of sup CVC=4

seqi=0.1:0.1:0.5;
eff=[seqi' zeros(length(seqi),4)];
iter=0;
k=4;
for i=seqi
[c,A,B,d] = HYPbdp(i,1,k);
iter=iter+1;
eff(iter,2:5)=[B^2/A A B d];
end
subplot(2,2,1)
plot(eff(:,1),eff(:,2))
title('efficiency')
subplot(2,2,2)
plot(eff(:,1),eff(:,3))
title('A')
subplot(2,2,3)
plot(eff(:,1),eff(:,4))
title('B')
subplot(2,2,4)
plot(eff(:,1),eff(:,5))
title('d')

### Analysis of efficiency as a function of k =sup CVC.

ktun=[2; 3; 4; 5];
eff=zeros(length(ktun),1);
for i=1:length(ktun)
[~,A1,B1]=HYPbdp(0.3,1,ktun(i));
eff(i)=B1^2/A1;
end
% Efficiency increases as sup CVC increases.
table(ktun,eff)

### Example of use of option traceiter.

traceiter=1
ktuning=4.5;
[c,A,B,d]=HYPbdp(0.4,1,ktuning,traceiter);

## Input Arguments

### bdp — requested breakdown point. Scalar.

Scalar defining breakdown point (i.e a number between 0 and 0.5)

Data Types: single|double

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

(e.g. in regression p=1)

Data Types: single|double|int32|int64

### k — supremum of the change of variance curve. Scalar.

$\sup CVC(psi,x) x \in R$.

Default value is k=4.5.

Example: 'k',5 

Data Types: double

### traceiter — Level of display. Scalar.

If traceiter = 1 it is possible to monitor how the value of the objective function E(rho)/\rho(\infty) gets closer to the target (bdp) during the iterations

Example: 'traceiter',0 

Data Types: single|double|int32|int64

## Output Arguments

### c —parameter c of hyperbolic tangent estimator. Scalar

For more details see the methodological details inside "More About" below

### A —parameter A of hyperbolic tangent estimator. Scalar

For more details see the methodological details inside "More About" below

### B —parameter B of hyperbolic tangent estimator. Scalar

For more details see the methodological details inside "More About" below

### d —parameter d of hyperbolic tangent estimator. Scalar

For more details see the methodological details inside "More About" below

$HYPpsi(u) = \left\{ \begin{array}{cc} u & |u| \leq d \\ \sqrt{A (k - 1)} \tanh \left( \sqrt{(k - 1) B^2/A} (c -|u|)/2 \right) sign(u) & d \leq |u| < c, \\ 0 & |u| \geq c. \end{array} \right.$ It is necessary to have $0 < A < B < 2 normcdf(c)-1- 2 c \times normpdf(c) <1$