findH              package:surveillance              R Documentation

_F_i_n_d _d_e_c_i_s_i_o_n _i_n_t_e_r_v_a_l _f_o_r _g_i_v_e_n _i_n-_c_o_n_t_r_o_l _A_R_L _a_n_d _r_e_f_e_r_e_n_c_e _v_a_l_u_e

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

     Function to find a decision interval 'h'* for given reference
     value 'k' and desired ARL gamma so that the average run length for
     a Poisson or Binomial CUSUM with in-control parameter theta_0,
     reference value 'k' and is approximately gamma, i.e. Big|
     frac{ARL(h^*) -gamma}{gamma} Big| < epsilon, or larger, i.e.
     ARL(h^*) > gamma .

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

     findH(ARL0, theta0, s = 1, rel.tol = 0.03, roundK = TRUE,
            distr = c("poisson", "binomial"), digits = 1, FIR = FALSE, ...)
                
     hValues(theta0, ARL0, rel.tol=0.02, s = 1, roundK = TRUE, digits = 1,
           distr = c("poisson", "binomial"), FIR = FALSE, ...)

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

    ARL0: desired in-control ARL gamma 

  theta0: in-control parameter theta_0

       s: change to detect, see details

   distr: '"poisson"' or '"binomial"' 

 rel.tol: relative tolerance, i.e. the search for 'h'* is stopped if
          Big| frac{ARL(h^*) -gamma}{gamma} Big| <  'rel.tol' 

  digits: the reference value 'k' and the decision  interval 'h' are
          rounded to 'digits' decimal places

  roundK: passed to 'findK' 

     FIR: if 'TRUE', the decision interval that leads to the desired
          ARL for a FIR CUSUM with head start frac{'h'}{2} is returned 

     ...: further arguments for the distribution function, i.e. number
          of trials 'n' for binomial cdf 

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

     The out-of-control parameter used to determine the reference value
     'k' is specified as:

                theta_1 = lambda_0 + s sqrt{lambda_0}

     for a Poisson variate X sim Po(lambda)


                 theta_1 = frac{s pi_0}{1+(s-1) pi_0}

     for a Binomial variate X sim Bin(n, pi) 

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

     'findH' returns a vector and 'hValues' returns a matrix with
     elements 

  theta0: in-control parameter

       h: decision interval

       k: reference value

     ARL: ARL for a CUSUM with parameters 'k' and 'h' 

 rel.tol: corresponds to Big| frac{ARL(h) -gamma}{gamma} Big| 

