HApsix

HApsix computes psi function using Hampel proposal times x

Syntax

Description

example

psiHAx =HApsix(u, ctuning) Plot of psi(x) multiplied by x.

Examples

expand all

  • Plot of psi(x) multiplied by x.
  • Obtain bottom panel of Figure 11.10. p. 375 of Hoaglin et al. (1987)

    x=-9:0.1:9;
    psiHAx=HApsix(x,1);
    plot(x,psiHAx)
    xlabel('x','Interpreter','Latex')
    ylabel(' Hampel $\psi(x) \times x $','Interpreter','Latex')
    Click here for the graphical output of this example (link to Ro.S.A. website). Graphical output could not be included in the installation file because toolboxes cannot be greater than 20MB. To load locally the image files, download zip file http://rosa.unipr.it/fsda/images.zip and unzip it to <tt>(docroot)/FSDA/images</tt> or simply run routine <tt>downloadGraphicalOutput.m</tt>

    Input Arguments

    expand all

    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

    ctuning — tuning parameters. Scalar or Vector.

    Scalar or vector of length 4 which specifies the value of the tuning constant c (scalar greater than 0 which controls the robustness/efficiency of the estimator) and the prefixed values of paramters a, b, c ctuning(1) = tuning constant which will multiply parameters a, b and c of Hampel rho (psi) function ctuning(2) = paramter a of Hampel rho (psi) function ctuning(3) = paramter b of Hampel rho (psi) function ctuning(4) = paramter c of Hampel rho (psi) function Remark: if length(ctuning)==1 values of a, b and c will be set to a=2*ctuning b=4*ctuning c=4*ctuning With these choices, if ctuning=1 the resulting influence function is nearly identical to the biweight with parameter 8.

    Data Types: single| double

    More About

    expand all

    Additional Details

    Function HApsix transforms vector u as follows \[ HApsi(u) = \left\{ \begin{array}{cc} u^2 & |u| <= a \\ a \times sign(u)u & a <= |u| < b \\ a \frac{c-|u|}{c-b} \times sign(u)\times u & b <= |u| < c \\ 0 & |u| >= c \end{array} \right. \]

    where $a$= ctuning(2) *ctuning(1).

    $b$= ctuning(3) *ctuning(1).

    $c$= ctuning(4) *ctuning(1).

    The default (if input ctuning is a scalar) is $a$= 2*ctuning.

    $b$= 4*ctuning.

    $c$= 8*ctuning.

    It is necessary to have 0 <= $a$ <= $b$ <= $c$

    References

    Hoaglin, D.C., Mosteller, F., Tukey, J.W. (1982), "Understanding Robust and Exploratory Data Analysis", Wiley, New York.

    This page has been automatically generated by our routine publishFS