HYPpsi

HYPpsi computes psi function for hyperbolic tangent estimator

Syntax

  • psiHYP=HYPpsi(u, cktuning)example

Description

example

psiHYP =HYPpsi(u, cktuning) Plot of hyperbolic psi function.

Examples

expand all

  • Plot of hyperbolic psi function.
  • % Plot of hyperbolic psi function.
    % Obtain Figure 2 of  p. 645 of HRR.
    x=-9:0.1:9;
    ctuning=6;
    ktuning=4.5;
    psiHYP=HYPpsi(x,[ctuning,ktuning]);
    plot(x,psiHYP)
    xlabel('$u$','Interpreter','Latex')
    ylabel(' Hyperbolic $\psi(u,c=6,k=4.5) $','Interpreter','Latex')
    text(ctuning,-0.1,'c','FontSize',14)
    text(-ctuning,0.1,'-c','FontSize',14)

    Related Examples

    expand all

  • Compare psi function for two values of parameter k.
  • close all
    x=-9:0.1:9;
    ctuning=6;
    ktuning=5;
    psiHYP=HYPpsi(x,[ctuning,ktuning]);
    plot(x,psiHYP,'color','b')
    text(6,1.5,['k=' num2str(ktuning)],'Color','b','FontSize',14)
    xlabel('$u$','Interpreter','Latex','FontSize',14)
    ylabel(' Hyperbolic $\psi(u,c=6,k) $','Interpreter','Latex','FontSize',14)
    text(ctuning,-0.1,'c','FontSize',14)
    text(-ctuning,0.1,'-c','FontSize',14)
    hold('on')
    ktuning=4;
    psiHYP=HYPpsi(x,[ctuning,ktuning]);
    plot(x,psiHYP,'color','k')
    text(2,1.3,['k=' num2str(ktuning)],'Color','k','FontSize',14)

  • Parameters associated to a value of bdp=1/2.
  • c=2.158325031399727
    k=4;
    A=0.000162707412432;
    B=0.006991738279441
    d=0.016982948780061
    x=-8:0.001:8;
    psiHYP=HYPpsi(x,[c,k,A,B,d]);
    plot(x,psiHYP)
    xlabel('x','Interpreter','Latex')
    ylabel(' Hyperbolic $\psi(x) $','Interpreter','Latex')

    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

    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

    expand all

    psiHYP —hyperbolic psi function. Vector

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

    More About

    expand all

    Additional Details

    Function HYPpsi transforms vector u as follows \[ 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$

    References

    Hampel, F.R., Rousseeuw, P.J. and Ronchetti E. (1981), The Change-of-Variance Curve and Optimal Redescending M-Estimators, "Journal of the American Statistical Association", Vol. 76, pp. 643-648 [HRR]

    Riani, M., Cerioli, A., Atkinson, A.C. and Perrotta, D. (2014), Monitoring Robust Regression, "Electronic Journal of Statistics", Vol. 8, pp. 646-677.

    See Also

    | |

    This page has been automatically generated by our routine publishFS