meanResponse: Calculate mean response needed in algo.hhh

Description Usage Arguments Details Value Author(s) References

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

1
meanResponse(theta, designRes)

Arguments

theta

vector of parameters

θ = (α_1,…,α_m, λ, φ, β, γ_1, …, γ_m, ψ),

where λ=(λ_1,…,λ_m), φ=(φ_1,…,φ_m), β=(β_1,…,β_m), γ_1=(γ_11,…,γ_(1,2S_1)), γ_m=(γ_m1,…,γ_(m,2S_m)), ψ=(ψ_1,…,ψ_m).

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

designRes

Result of a call to make.design

Details

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

μ_t = λ y_t-lag + ν_t

where

log(ν_t) = α + β t + ∑_(j=1)^S (γ_(2j-1) * \sin(ω_j * t) + γ_2j * \cos(ω_j * t) )

and ω_j = 2 * π * 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 γ_s sin(ω_s * t) + δ_s cos(ω_s * t) = A_s sin(ω_s * t + ε_s) with amplitude A_s=sqrt{γ_s^2 +δ_s^2} and phase difference \tan(ε_s) = δ_s / γ_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

μ_it = λ_i * y_i,t-lag + φ_i * ∑_(j ~ i) w_ji * y_j,t-lag + n_it * ν_it

where

log(ν_it) = α_i + β_i * t + ∑_(j=1)^S_i (γ_(i,2j-1) * \sin(ω_j * t) + γ_(i,2j) * \cos(ω_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

μ_it = λ_i *π_i * y_i,t-1 + ∑_(j ~ i) λ_j *(1-π_j)/|k ~ j| * y_j,t-1 + n_it * ν_it

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

Value

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 λ_i * y_i,t-1 + φ_i * ∑_(j ~ i) y_j,t-1

endemic

matrix with the endemic part of the mean n_it*nu_it

epi.own

matrix with λ_i * y_i,t-1

epi.neighbours

matrix with φ_i * ∑_(j ~ i) y_j,t-1

Author(s)

M. Paul, L. Held

References

Held, L., Höhle, 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.


jimhester/surveillance documentation built on May 19, 2019, 10:33 a.m.