surveillance (version 1.12.1)

meanResponse: Calculate mean response needed in algo.hhh

Description

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 given in equations (2) and (4) in Paul et al., 2008) for multivariate time series. See details.

Usage

meanResponse(theta, designRes)

Arguments

theta
vector of parameters $\theta = (\alpha_1,\ldots,\alpha_m, \bold{\lambda}, \bold{\phi}, \bold{\beta}, \bold{\gamma}_1, \ldots, \bold{\gamma}_m,
designRes
Result of a call to make.design

Value

  • Returns a list with elements
  • meanmatrix of dimension $n \times 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.
  • epidemicmatrix with the epidemic part $\lambda_i y_{i,t-1} + \phi_i \sum_{j \sim i} y_{j,t-1}$
  • endemicmatrix with the endemic part of the mean $n_{it} \nu_{it}$
  • epi.ownmatrix with $\lambda_i y_{i,t-1}$
  • epi.neighboursmatrix with $\phi_i \sum_{j \sim i} y_{j,t-1}$

encoding

latin1

Details

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 \sim 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 \sim i} \lambda_j (1-\pi_j)/ |k \sim j| y_{j,t-1} + n_{it} \nu_{it}$$ if proportion="single" ("multiple") in designRes$control. Note that this model specification is still experimental.

References

Held, L., H�hle{Hoehle}, M., Hofmann, M. (2005) A statistical framework for the analysis of multivariate infectious disease surveillance counts, Statistical Modelling, 5, 187--199. Paul, M., Held, L. and Toschke, A. M. (2008) Multivariate modelling of infectious disease surveillance data, Statistics in Medicine, 27, 6250--6267.