meanResponse      package:surveillance      R Documentation(latin1)

_C_a_l_c_u_l_a_t_e _m_e_a_n _r_e_s_p_o_n_s_e _n_e_e_d_e_d _i_n _a_l_g_o._h_h_h

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

     Calculates the mean response for the model specified in designRes 
     according to equations (1.2) and (1.1) in Held et al., 2005 for
     univariate time series and equations (3.3) and (3.2) (with
     extensions) for multivariate time series. See details.

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

     meanResponse(theta, designRes)

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

   theta: vector of parameters 

          theta = (alpha_1,...,alpha_m, lambda, phi, beta,  gamma_1,
          ..., gamma_m, psi),

          where lambda=(lambda_1,...,lambda_m),  phi=(phi_1,...,phi_m),
           beta=(beta_1,...,beta_m), 
          gamma_1=(gamma_11,...,gamma_(1,2S_1)), 
          gamma_m=(gamma_m1,...,gamma_(m,2S_m)), 
          psi=(psi_1,...,psi_m).

          If the model specifies less parameters, those components are
          omitted.

designRes: Result of a call to 'make.design' 

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

     Calculates the mean response for a Poisson or a negative binomial
     model with mean

                     mu_t = lambda y_t-lag + nu_t

     where  

 log(nu_t) = alpha + beta t + sum_(j=1)^S (gamma_(2j-1) * sin(omega_j * t) + gamma_2j * cos(omega_j * t) )

     and omega_j = 2 * pi * j / period are Fourier frequencies with
     known period, e.g. 'period'=52 for weekly data, for a univariate
     time series.

     Per default, the number of cases at time point t-1, i.e. lag=1,
     enter as autoregressive covariates into the model. Other lags can
     also be considered.

     The seasonal terms in the predictor can also be expressed as
     gamma_s sin(omega_s * t) + delta_s cos(omega_s * t) = A_s
     sin(omega_s * t + epsilon_s) with amplitude A_s=sqrt{gamma_s^2
     +delta_s^2}  and phase difference tan(epsilon_s) = delta_s /
     gamma_s. The amplitude and phase shift can be obtained from a
     fitted model by specifying 'amplitudeShift=TRUE' in the 'coef'
     method.

     For multivariate time series the mean structure is

 mu_it = lambda_i * y_i,t-lag + phi_i * sum_(j ~ i) w_ji * y_j,t-lag + n_it * nu_it

     where 

 log(nu_it) = alpha_i + beta_i * t + sum_(j=1)^S_i (gamma_(i,2j-1) * sin(omega_j * t) + gamma_(i,2j) * cos(omega_j * t) )

     and n_it are standardized population counts. The weights w_ji are
     specified in the columns of the neighbourhood matrix
     'disProgObj$neighbourhood'.

     Alternatively, the mean can be specified as

 mu_it = lambda_i *pi_i * y_i,t-1 + sum_(j ~ i) lambda_j *(1-pi_j)/|k ~ j| * y_j,t-1 + n_it * nu_it

     if 'proportion'="single" ("multiple") in 'designRes$control'. Note
     that this model specification is still experimental.

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

     Returns a 'list' with elements 

    mean: matrix of dimension n x m with the calculated mean  response
          for each time point and unit, where n is the number of time 
          points and m is the number of units. 

epidemic: matrix with the epidemic part  lambda_i * y_i,t-1 + phi_i *
          sum_(j ~ i) y_j,t-1 

 endemic: matrix with the endemic part of the mean n_it*nu_it  

 epi.own: matrix with lambda_i * y_i,t-1 

epi.neighbours: matrix with phi_i * sum_(j ~ i) y_j,t-1 

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

     M. Paul, L. Held

_S_o_u_r_c_e:

     Held, L., Hoehle, M., Hofmann, M. (2005) A statistical framework
     for the  analysis of multivariate infectious disease surveillance
     counts.  _Statistical Modelling_, *5*, p. 187-199.

