surveillance (version 1.12.1)

algo.hhh: Fit a Classical HHH Model (DEPRECATED)

Description

Fits a Poisson or negative binomial model to a (multivariate) time series of counts as described by Held et al. (2005) and Paul et al. (2008). Note that this implementation is deprecated and superseded by the function hhh4. We keep algo.hhh in the package only for backwards compatibility with the original publications.

Usage

algo.hhh(disProgObj, control=list(lambda=TRUE, neighbours=FALSE, 
   linear=FALSE, nseason = 0,
   negbin=c("none", "single", "multiple"), 
   proportion=c("none", "single", "multiple"),lag.range=NULL), 
   thetastart=NULL, verbose=TRUE)

Arguments

disProgObj
object of class disProg
control
control object: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
thetastart
vector with starting values for all parameters specified in the control object (for optim). See algo.hhh.grid.
verbose
if true information about convergence is printed

Value

  • Returns an object of class ah with elements
  • coefficientsestimated parameters
  • seestimated standard errors
  • covcovariance matrix
  • loglikelihoodloglikelihood
  • convergencelogical indicating whether optim converged or not
  • fitted.valuesfitted mean values $\mu_{i,t}$
  • controlspecified control object
  • disProgObjspecified disProg-object
  • lagwhich lag was used for the autoregressive parameters $lambda$ and $phi$
  • nObsnumber of observations used for fitting the model

encoding

latin1

Details

This functions fits a model as specified in equations (1.2) and (1.1) in Held et al. (2005) to univariate time series, and as specified in equations (3.3) and (3.2) (with extensions given in equations (2) and (4) in Paul et al., 2008) to multivariate time series.

For univariate time series, the mean structure of a Poisson or a negative binomial model is $$\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. 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. 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 the control argument. 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.

See Also

algo.hhh.grid, hhh4

Examples

Run this code
# univariate time series: salmonella agona cases 
data(salmonella.agona)

model1 <- list(lambda=TRUE, linear=TRUE, 
               nseason=1, negbin="single")
               
algo.hhh(salmonella.agona, control=model1)

# multivariate time series: 
# measles cases in Lower Saxony, Germany
data(measles.weser)

# same model as above
algo.hhh(measles.weser, control=model1)

# include autoregressive parameter phi for adjacent "Kreise"
# specifiy start values for theta
model2 <- list(lambda = TRUE, neighbours = TRUE, 
               linear = FALSE, nseason = 1, 
               negbin = "single")
algo.hhh(measles.weser, control = model2, thetastart = rep(0, 20) )
                  
## weekly counts of influenza and meningococcal infections 
## in Germany, 2001-2006
data(influMen)

# specify model with two autoregressive parameters lambda_i, overdispersion
# parameters psi_i, an autoregressive parameter phi for meningococcal infections
# (i.e. nu_flu,t = lambda_flu * y_flu,t-1  
#  and  nu_men,t = lambda_men * y_men,t-1 + phi_men*y_flu,t-1 )
# and S=(3,1) Fourier frequencies
model <- list(lambda=c(TRUE,TRUE), neighbours=c(FALSE,TRUE),
              linear=FALSE,nseason=c(3,1),negbin="multiple")
              
# run algo.hhh
algo.hhh(influMen, control=model)

# now meningococcal infections in the same week should enter as covariates
# (i.e. nu_flu,t = lambda_flu * y_flu,t-1  
#  and  nu_men,t = lambda_men * y_men,t-1 + phi_men*y_flu,t )
model2 <- list(lambda=c(1,1), neighbours=c(NA,0),
              linear=FALSE,nseason=c(3,1),negbin="multiple")
              
algo.hhh(influMen, control=model2)

Run the code above in your browser using DataLab