sts-class        package:surveillance        R Documentation(latin1)

_C_l_a_s_s "_s_t_s" - _s_u_r_v_e_i_l_l_a_n_c_e _t_i_m_e _s_e_r_i_e_s

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

     This is a rather leightweight class to implement multivariate time
     series of count used for public health surveillance data. The
     class captures the time series data as well as the spatial layout
     of the regions, where the data originate from.

_S_l_o_t_s:


     '_w_e_e_k': Object of class 'numeric' specifying the week numbers.
          Actually this is not really used at the moment. 

     '_f_r_e_q': If weekly data 'freq' corresponds to 52, in case of
          monthly data 'freq' is 12.

     '_s_t_a_r_t': vector of length two denoting the year and the sample
          number (week, month, etc.) of the first observation

     '_o_b_s_e_r_v_e_d': A matrix of size 'length(week)' times the number of
          regions containing the weekly/monthly number of counts in
          each region. The colnames of the matrix should match the ID
          values of the shapes in the 'map' slot.

     '_s_t_a_t_e': Matrix with the same dimension as 'observed' containing
          booleans whether at the specific time point there was an
          outbreak in the region

     '_a_l_a_r_m': Matrix with the same dimension as 'observed' specifying
          whether an outbreak detection algorithm declared a specific
          time point in the region as having an alarm. If the object
          containins just observations then this slot is null. 

     '_u_p_p_e_r_b_o_u_n_d': Matrix with upper bound values 

     '_n_e_i_g_h_b_o_u_r_h_o_o_d': Symmetric matrix of booleans size (number of
          regions)^2 stating the neighbourhood matrix.  

     '_p_o_p_u_l_a_t_i_o_n_F_r_a_c': Object of class 'matrix'.

     '_m_a_p': Object of class 'SpatialPolygonsDataFrame' providing a
          shape of the areas which are monitored. 

     '_c_o_n_t_r_o_l': Object of class 'list', thais is a rather free data
          type to be returned by the surveillance algorithms. 

     '_e_p_o_c_h_A_s_D_a_t_e': Object of class '"logical"' stating whether to use
          a ISO 8601 representation of the epoch/week slot using the
          'Date' class ('epochAsDate=TRUE') or just to interpret the
          epochs/weeks as numerics ('epochAsDate=FALSE').

     '_m_u_l_t_i_n_o_m_i_a_l_T_S': Object of class '"logical"' stating whether to
          interpret the object as 'observed' out of 'population', i.e.
          a multinomial interpretation instead of a count
          interpretation.

_M_e_t_h_o_d_s:


     _n_c_o_l 'signature(x = "sts")': extract number of columns of the
          'observed' matrix slot.

     _d_i_m 'signature(x = "sts")': extract matrix dimensions of
          'observed' using 'dim'.

     _o_b_s_e_r_v_e_d 'signature(x = "sts")': extract the 'observed' slot of an
          'sts' object.

     _p_o_p_u_l_a_t_i_o_n 'signature(x = "sts")': extract the 'population' slot
          of an 'sts' object.

     _a_l_a_r_m_s 'signature(x = "sts")': extract the 'alarm' slot of an
          'sts' object.

     _u_p_p_e_r_b_o_u_n_d 'signature(x = "sts")': extract the 'upperbound' slot
          of an 'sts' object.

     _c_o_n_t_r_o_l 'signature(x = "sts")': extract the 'control' slot of an
          'sts' object.

     _e_p_o_c_h 'signature(x = "sts")': extract the 'epoch' slot of an 'sts'
          object. If ISO dates are used then the returned object is of
          class 'Date'.

     _e_p_o_c_h_I_n_Y_e_a_r 'signature(x = "sts")': Returns the epoch number
          within the year of the 'epoch' slot.

     _c_o_l_n_a_m_e_s 'signature(x="sts",do.NULL="missing",prefix="missing")':
          extract 'colnames' of the 'observed' matrix.

     _i_n_i_t_i_a_l_i_z_e 'signature(x="sts")': the internal function 'init.sts'
          is called, which assigns all slots.  

     _a_g_g_r_e_g_a_t_e 'signature(x="sts")': see 'aggregate,sts-method'

     _y_e_a_r 'signature(x = "sts")': extracts the corresponding year of
          each observation of 'x'

     _o_b_s_i_n_y_e_a_r 'signature(x = "sts")': extracts the corresponding week
          number within the year of each observation of 'x'

     _a_s._d_a_t_a._f_r_a_m_e 'signature(x = "sts")': converts the 'observed',
          'week', 'state' and 'alarm' slots of 'x' into a data frame
          with column names matching the colnames of the respective
          slots. Useful when one wants to fit a model based on the
          object

     _p_l_o_t 'signature(x="sts",y="missing",function(x, y, type,...)...)':
          this function is the successor of the 'plot.disProg' and 
          'plot.survRes' functions. It takes (more or less) the same
          arguments as 'plot.survRes'. The most important difference is
          the type of plot, which is specified using 'type'. See
          'show,sts-method' for details.


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

     M. Hoehle

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

       data("ha")
       shp <- system.file("shapes/berlin.shp",package="surveillance")
       ha <- disProg2sts(ha, map=readShapePoly(shp,IDvar="SNAME"))
       plot(ha,type=observed ~ 1 | unit)

