# HUpsider

HUpsider computes derivative of psi function (second derivative of rho function) for Huber

## Syntax

• psider=HUpsider(u,c)example

## Description

 psider =HUpsider(u, c) Plot of derivative of psi function.

## Examples

expand all

### Plot of derivative of psi function.

x=-6:0.01:6;
psiHUder=HUpsider(x,2);
plot(x,psiHUder)
xlabel('x','Interpreter','Latex')
ylabel('$\psi''(x)$','Interpreter','Latex')

## Input Arguments

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

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

Data Types: single| double

### c — tuning constant. 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

### psider —derivative of psi function.  Vector

n x 1 vector which contains the values of the derivative of the Huber psi function associated to the residuals or Mahalanobis distances for the n units of the sample.

Function HUpsider transforms vector x as follows HUpsider(x)= $HUpsider(u)= \left\{ \begin{array}{cc} 1 & \mbox{if } |u/c| \leq 1 \\ 0 & |u/c|>1 \\ \end{array} \right.$