# HYPck

HYPck computes values of the scalars A, B, d for hyperbolic tangent estimator

## Syntax

• Anew=HYPck(c,k)example
• Anew=HYPck(c,k,A)example
• Anew=HYPck(c,k,A,B)example
• Anew=HYPck(c,k,A,B,d)example
• [Anew,Bnew]=HYPck(___)example
• [Anew,Bnew,d]=HYPck(___)example

## Description

 Anew =HYPck(c, k) Reconstuct columns 3:6 of Table 2 of HRR.

 Anew =HYPck(c, k, A)

 Anew =HYPck(c, k, A, B)

 Anew =HYPck(c, k, A, B, d)

 [Anew, Bnew] =HYPck(___)

 [Anew, Bnew, d] =HYPck(___)

## Examples

expand all

### Reconstuct columns 3:6 of Table 2 of HRR.

cc=3:6;
kk=4:0.5:5;
ABD=zeros(length(cc)*length(kk),4);
ij=1;
for c=cc
for k=kk
[A,B,d]=HYPck(c,k);
eff=B^2/A;
ABD(ij,:)=[A,B,d,eff];
ij=ij+1;
end
end

## Input Arguments

### c — tuning constant c. Scalar.

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

Data Types: single| double

### k — sup of change of variance curve (CVC). Scalar.

$k= supCVC(psi,x) x \in R$

Data Types: single| double

### A — A parameter. Scalar.

Starting value for parameter A

Example: 'A',0.85 

Data Types: double

### B — B parameter. Scalar.

Starting value for parameter B

Example: 'B',0.9 

Data Types: double

### d — d parameter. scalar.

Starting value for parameter d

Example: 'd',1,5 

Data Types: double

## Output Arguments

### Anew —Value of parameter A. Scalar

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

### Bnew —Value of parameter B. Scalar

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

### d —Value of parameter d. 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$