HUrho

HUrho computes rho function for Huber

Syntax

Description

example

rhoHU =HUrho(u, c) Plot Huber rho function.

Examples

expand all

  • Plot Huber rho function.
  • close all
    x=-3:0.001:3;
    c=1.345;
    rhoHU=HUrho(x,c);
    plot(x,rhoHU,'LineStyle','-','LineWidth',2)
    fs=14;
    xlabel('$u$','Interpreter','Latex','FontSize',fs)
    ylabel('$\rho (u,1.345)$','Interpreter','Latex','FontSize',fs)
    yc=0.13;
    text(-c,yc,'-c=-1.345','HorizontalAlignment','right','FontSize',fs)
    text(c,yc,'c=1.345','FontSize',fs)
    hold('on')
    plot(x,x.^2/2,'LineStyle',':','LineWidth',1.5)
    stem(c,c^2/2)
    stem(-c,c^2/2)
    legend(["Huber $\rho$ function" "$u^2/2$"], ...
    'Interpreter','latex','FontSize',16,'Location','best')
    Click here for the graphical output of this example (link to Ro.S.A. website).

    Related Examples

    expand all

  • Huber rhos function for two values of c.
  • x=-6:0.01:6;
    c=1.345;
    rhoHU=HUrho(x,c);
    plot(x,rhoHU)
    xlabel('u','Interpreter','Latex')
    ylabel('$\rho (x,1.345)$','Interpreter','Latex')
    text(-c,0,'-c')
    text(c,0,'c')
    title('$\rho (u,c)$ with $c=1,345$ and $c=2$','Interpreter','Latex')
    hold('on')
    rhoHU=HUrho(x,2);
    plot(x,rhoHU,'-.')

    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

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

    More About

    expand all

    Additional Details

    function HUrho transforms vector u as follows \[ HUrho(u)= \left\{ \begin{array}{cc} (u^2/2) & |u/c| \leq 1 \\ c|u| -c^2/2 & |u/c| >1 \\ \end{array} \right. \]

    See equation (2.27) p. 26 of Maronna et al. (2006).

    Remark: equation (2.26) is written in standardized terms in such a way that $\rho(c)=1$, so it is the previous expression multiplied by $2$

    References

    Maronna, R.A., Martin D. and Yohai V.J. (2006), "Robust Statistics, Theory and Methods", Wiley, New York.

    Riani, M., Cerioli, A. and Torti, F. (2014), On consistency factors and efficiency of robust S-estimators, "TEST", Vol. 23, pp. 356-387.

    http://dx.doi.org/10.1007/s11749-014-0357-7

    This page has been automatically generated by our routine publishFS