# HYPpsix

HYPpsix computes psi function for hyperbolic tangent estimator times x

## Syntax

• psiHYPx=HYPpsix(u, cktuning)example

## Description

 psiHYPx =HYPpsix(u, cktuning) plot of psi(x)*x for Hyperbolic estimator.

## Examples

expand all

### plot of psi(x)*x for Hyperbolic estimator.

% plot of psi(x)*x for Hyperbolic estimator.
x=-9:0.1:9;
ctuning=6;
ktuning=4.5;
psiHYPx=HYPpsix(x,[ctuning,ktuning]);
plot(x,psiHYPx)
xlabel('x','Interpreter','Latex')
ylabel('$\psi (x) \times 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

### cktuning — tuning parameters. Vector of length 2 or of length 5.

cktuning specifies the value of the tuning constant c (scalar greater than 0 which controls the robustness/efficiency of the estimator) and the prefixed value k (sup of the change-of-variance sensitivity) and the values of parameters A, B and d.

cktuning(1) = c;

cktuning(2) = k = supCVC(psi,x) x \in R;

cktuning(3)=A;

cktuning(4)=B;

cktuning(5)=d;

Remark - if length(cktuning)==2 values of A, B and d will be computed automatically

Data Types: single| double

## Output Arguments

### psiHYPx —psi(u)*u function.  Vector

n x 1 vector which contains the values of hyperbolic psi(u)*u function associated to the residuals or Mahalanobis distances for the n units of the sample.

Function HYPpsix transforms vector $u$ as follows $HYPpsix(u) = \left\{ \begin{array}{cc} u^2 & |u| \leq d \\ \sqrt{A (k - 1)} \tanh \left( \sqrt{(k - 1) B^2/A} (c -|u|)/2 \right) sign(u) 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 normpdf(c) <1$