roblox                package:RobLox                R Documentation

_O_p_t_i_m_a_l_l_y _r_o_b_u_s_t _e_s_t_i_m_a_t_o_r _f_o_r _l_o_c_a_t_i_o_n _a_n_d/_o_r _s_c_a_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     The function 'roblox' computes the optimally robust estimator and
     corresponding IC for normal location und/or scale and  (convex)
     contamination neighborhoods. The definition of  these estimators
     can be found in Rieder (1994) or Kohl (2005), respectively.

_U_s_a_g_e:

     roblox(x, mean, sd, eps, eps.lower, eps.upper, initial.est = "ksMD", 
            tol = 1e-06, A.loc.start = 1, a.sc.start = 0, A.sc.start = 0.5, 
            bUp = 1000, itmax = 100, returnIC = FALSE)

_A_r_g_u_m_e_n_t_s:

       x: vector 'x' of data values 

    mean: specified mean.

      sd: specified standard deviation.

     eps: positive real (0 < 'eps' <= 0.5): amount of gross errors. 
          See details below. 

eps.lower: positive real (0 <= 'eps.lower' <= 'eps.upper'):  lower
          bound for the amount of gross errors. See details below 

eps.upper: positive real ('eps.lower' <= 'eps.upper' <= 0.5):  upper
          bound for the amount of gross errors. See details below 

initial.est: indicates which initial estimate should be used. Must be 
          one of '"ksMD"' or '"med"'. In case '"ksMD"' the 
          Kolmogorov(-Smirnov) minimum distance estimator and in case
          '"med"' median and/or mad are computed, respectively. 

     tol: the desired accuracy (convergence tolerance). 

A.loc.start: positive real: starting value for  the standardizing
          constant of the location part. 

a.sc.start: real: starting value for centering constant of the scale
          part. 

A.sc.start: positive real: starting value for  the standardizing
          constant of the scale part. 

     bUp: positive real: the upper end point of the  interval to be
          searched for the clipping bound b. 

   itmax: the maximum number of iterations. 

returnIC: logical: should IC be returned. See details below. 

_D_e_t_a_i_l_s:

     Computes the optimally robust estimator for location with scale
     specified, scale with location specified, or both if neither is
     specified.

     If the amount of gross errors (contamination) is known, it can be 
     specified by 'eps'. The radius of the corresponding infinitesimal 
     contamination neighborhood is obtained by multiplying 'eps'  by
     the square root of the sample size. 

     If the amount of gross errors (contamination) is unknown, try to
     find a  rough estimate for the amount of gross errors, such that
     it lies  between 'eps.lower' and 'eps.upper'.

     In case 'eps.lower' is specified and 'eps.upper' is missing, 
     'eps.upper' is set to 0.5. In case 'eps.upper' is specified and
     'eps.lower' is missing, 'eps.lower' is set to 0.

     If neither 'eps' nor 'eps.lower' and/or 'eps.upper' is  specified,
     'eps.lower' and 'eps.upper' are set to 0 and 0.5,  respectively.

     If 'eps' is missing, the radius-minimax estimator in sense of 
     Rieder et al. (2001), respectively Section 2.2 of Kohl (2005) is
     returned.

_V_a_l_u_e:

     list of location and scale estimates 

   mean : Description of 'comp1'

     sd : Description of 'comp2'

   optIC: object of class '"ContIC"'; optimally robust IC 

_A_u_t_h_o_r(_s):

     Matthias Kohl Matthias.Kohl@stamats.de

_R_e_f_e_r_e_n_c_e_s:

     Rieder, H. (1994) _Robust Asymptotic Statistics_. New York:
     Springer.

     Rieder, H., Kohl, M. and Ruckdeschel, P. (2001) The Costs of not
     Knowing the Radius. Submitted. Appeared as discussion paper Nr.
     81.  SFB 373 (Quantification and Simulation of Economic
     Processes), Humboldt University, Berlin; also available under
     <URL:
     www.uni-bayreuth.de/departments/math/org/mathe7/RIEDER/pubs/RR.pdf>

     Kohl, M. (2005) _Numerical Contributions to the Asymptotic Theory
     of Robustness_.  Bayreuth: Dissertation.

_S_e_e _A_l_s_o:

     'ContIC-class', 'rlOptIC',  'rsOptIC', 'rlsOptIC.AL'

_E_x_a_m_p_l_e_s:

     ind <- rbinom(100, size=1, prob=0.05) 
     x <- rnorm(100, mean=ind*3, sd=(1-ind) + ind*9)

     ## amount of gross errors known
     res1 <- roblox(x, eps = 0.05, returnIC = TRUE)
     res1$mean
     res1$sd
     res1$optIC
     checkIC(res1$optIC)
     Risks(res1$optIC)
     Infos(res1$optIC)
     plot(res1$optIC)
     infoPlot(res1$optIC)

     ## amount of gross errors unknown
     res2 <- roblox(x, eps.lower = 0.01, eps.upper = 0.1, returnIC = TRUE)
     res2$mean
     res2$sd
     res2$optIC
     checkIC(res2$optIC)
     Risks(res2$optIC)
     Infos(res2$optIC)
     plot(res2$optIC)
     infoPlot(res2$optIC)

     ## estimator comparison
     # classical optimal (non-robust)
     c(mean(x), sd(x))
     # most robust
     c(median(x), mad(x))
     # Kolmogorov(-Smirnov) minimum distance estimator (robust)
     ksEstimator(x, distribution = Norm())
     # optimally robust (amount of gross errors known)
     c(res1$mean, res1$sd)
     # optimally robust (amount of gross errors unknown)
     c(res2$mean, res2$sd)

