refvalIdxByDate     package:surveillance     R Documentation(latin1)

_C_o_m_p_u_t_e _i_n_d_i_c_e_s _o_f _r_e_f_e_r_e_n_c_e _v_a_l_u_e _u_s_i_n_g _D_a_t_e _c_l_a_s_s

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

     The reference values are formed base on computatations  of 'seq'
     for Date class arguments.

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

     refvalIdxByDate(t0, b, w, epochStr, epochs)

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

      t0: A Date object describing the time point

       b: Number of years to go back in time

       w: Half width of window to include reference values for

epochStr: One of '"1 month"', '"1 week"' or '"1 day"'

  epochs: Vector containing the epoch value of the sts/disProg object

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

     Using the Date class the reference values are formed as follows:
     Starting from 't0' go i, i= 1,...,'b' years back in time. For each
     year, go 'w' epochs back and include from here to 'w' epochs after
     't0'.

     In case of weeks we always go back to the closest monday of this
     date. In case of months we also go back in time to closest 1st of
     month.

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

     a vector of indices in epochs which match

