stcd          package:surveillance          R Documentation(latin1)

_S_p_a_t_i_o-_t_e_m_p_o_r_a_l _c_l_u_s_t_e_r _d_e_t_e_c_t_i_o_n

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

     Shiryaev-Roberts based prospective spatio-temporal cluster
     detection as in Assuncao & Correa (2009).

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

     stcd(x, y,t,radius,epsilon,threshold)

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

       x: Vector containing spatial x coordinate of the events.

       y: Vector containing spatial y coordinate of the events.

       t: Vector containing the time points of the events. It is
          assumed that the vector is sorted (early->last).

  radius: Radius of the cluster to detect.

 epsilon: Relative change of event-intensity within the cluster to
          detect. See reference paper for an explicit definition.

threshold: Threshold limit for the alarm and should be equal to the
          desired Average-Run-Length (ARL) of the detector.

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

     Shiryaev-Roberts based spatio-temporal cluster detection based on
     the work in Assuncao and Correa (2009). The implementation is
     based on C++ code originally written by Marcos Oliveira Prates,
     UMFG, Brazil and provided by Thais Correa, UMFG, Brazil during her
     research stay in Munich. This stay was financially supported by
     the Munich Center of Health Sciences.

     Note that the vectors 'x', 'y' and 't' need to be of the same
     length. Furthermore, the vector 't' needs to be sorted (to improve
     speed, the latter is not verified within the function).

     The current implementation uses a call to a C++ function to
     perform the actual computations of the test statistic. The
     function is currently experimental - data type and results may be
     subject to changes.

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

     A list with three components 

       R: A vector of the same length as the input containing the value
          of the test statistic for each observation.

   idxFA: Index in the x,y,t vector causing a possible alarm. If no
          cluster was detected, then a value of '-1' is returned here.

   idxCC: index in the x,y,t vector of the event containing the
          cluster. If no cluster was detected, then a value of '-1' is
          returned here.

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

     M. O. Prates, T. Correa and M. Hoehle

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

     Assuncao, R. and Correa, T. (2009), Surveillance to detect
     emerging space-time clusters, Computational Statistics & Data
     Analysis, 53(8):2817-2830.

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

     library("splancs")
     data(burkitt)

     #Parameters for the SR detection
     epsilon <- 0.5 # relative change within the cluster
     radius <- 20 # radius
     threshold <- 161 # threshold limit

     res <- stcd(burkitt$x,burkitt$y,burkitt$t,radius,epsilon,threshold)

     #Index of the event
     which.max(res$R >= threshold)

