abc.ci                 package:boot                 R Documentation

_N_o_n_p_a_r_a_m_e_t_r_i_c _A_B_C _C_o_n_f_i_d_e_n_c_e _I_n_t_e_r_v_a_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     Calculate equi-tailed two-sided nonparametric approximate
     bootstrap confidence  intervals for a parameter, given a set of
     data and an estimator of the  parameter, using numerical
     differentiation.

_U_s_a_g_e:

     abc.ci(data, statistic, index=1, strata=rep(1, n), conf=0.95, 
            eps=0.001/n, ...)

_A_r_g_u_m_e_n_t_s:

    data: A data set expressed as a vector, matrix or data frame. 

statistic: A function which returns the statistic of interest.  The
          function must take at least 2 arguments; the first argument
          should be the data and the second a vector of weights.  The
          weights passed to 'statistic' will be  normalized to sum to 1
          within each stratum.  Any other arguments should be  passed
          to 'abc.ci' as part of the '...{}' argument.   

   index: If 'statistic' returns a vector of length greater than 1,
          then this indicates the position of the variable of interest
          within that vector. 

  strata: A factor or numerical vector indicating to which sample each
          observation belongs in multiple sample problems.  The default
           is the one-sample case.   

    conf: A scalar or vector containing the confidence level(s) of the
          required interval(s). 

     eps: The value of epsilon to be used for the numerical
          differentiation. 

     ...: Any other arguments for 'statistic'.  These will be passed
          unchanged to 'statistic' each time it is called within
          'abc.ci'. 

_D_e_t_a_i_l_s:

     This function is based on the function 'abcnon' written by R.
     Tibshirani. A listing of the original function is available in
     DiCiccio and Efron (1996). The function uses numerical
     differentiation for the first and second derivatives of the
     statistic and then uses these values to approximate the bootstrap
     BCa intervals.  The total number of evaluations of the statistic
     is '2*n+2+2*length(conf)' where 'n' is the number of data points
     (plus calculation of the original value of the statistic).  The
     function  works for the multiple sample case without the need to
     rewrite the statistic in an artificial form since the stratified
     normalization is done internally by the function.

_V_a_l_u_e:

     A 'length(conf)' by 3 matrix where each row contains the
     confidence level  followed by the lower and upper end-points of
     the ABC interval at that level.

_R_e_f_e_r_e_n_c_e_s:

     Davison, A.C. and Hinkley, D.V. (1997)  _Bootstrap Methods and
     Their Application_, Chapter 5.  Cambridge University Press. 

     DiCiccio, T. J. and Efron B. (1992) More accurate confidence
     intervals in  exponential families. _Biometrika_, *79*, 231-245.

     DiCiccio, T. J.  and Efron  B. (1996) Bootstrap confidence
     intervals (with Discussion).  _Statistical Science_, *11*,
     189-228.

_S_e_e _A_l_s_o:

     'boot.ci'

_E_x_a_m_p_l_e_s:

     # 90% and 95% confidence intervals for the correlation 
     # coefficient between the columns of the bigcity data

     abc.ci(bigcity, corr, conf=c(0.90,0.95))

     # A 95% confidence interval for the difference between the means of
     # the last two samples in gravity
     mean.diff <- function(y, w)
     {    gp1 <- 1:table(as.numeric(y$series))[1]
          sum(y[gp1,1] * w[gp1]) - sum(y[-gp1,1] * w[-gp1])
     }
     grav1 <- gravity[as.numeric(gravity[,2])>=7,]
     abc.ci(grav1, mean.diff, strata=grav1$series)

