meanResponse {surveillance} | R Documentation |
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) for multivariate time series. See details.
meanResponse(theta, designRes)
theta |
vector of parameters
theta = (λ, phi, β, gamma_1, delta_1, gamma_2, delta_2, ..., psi, α_1, α_2, ...). If the model specifies less parameters, those components are omitted. |
designRes |
Result of a call to make.design |
Calculates the mean response for a Poisson or a Negative Binomial model with mean
μ_t = nu_t + λ y_{t-1}
where
log nu_t = α + β t + sum_{s=1}^{S}(gamma_s sin(omega_s t) + delta_s cos(omega_s t))
and Fourier frequencies omega_s = 2sπ/period for a univariate time series. For multivariate time series the mean structure is
μ_{it} = λ y_{i,t-1} + phi sum_{j sim i} y_{j,t-1} + n_{it} nu_{it}
where
log nu_{it} = α_i + β t + sum_{s=1}^{S}(gamma_s sin(omega_s t) + delta_s cos(omega_s t))
and n_{it} are standardized population counts.
Returns a matrix 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.
M. Paul, L. Held
Held, L., Höhle, M., Hofmann, M. (2005). A statistical framework for the analysis of multivariate infectious disease surveillance counts. Statistical Modelling, 5, p. 187-199.