algo.hhh {surveillance}R Documentation

Model fit based on the Held, Hoehle, Hofman paper

Description

Fits a Poisson/negative binomial model with mean μ_it (as described in Held/Höhle/Hofmann, 2005) to a multivariate time series of counts.

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:
lambda
If TRUE an autoregressive parameter λ is included, if lambda is a vector of logicals, unit-specific parameters λ_i are included. By default, observations y_t-lag at the previous time points, i.e. lag=1, are used for the autoregression. Other lags can be used by specifying lambda as a vector of integers, see Examples and meanResponse for details.
neighbours
If TRUE an autoregressive parameter for adjacent units phi is included, if neighbours is a vector of logicals, unit-specific parameters phi_i are included. By default, observations y_t-lag at the previous time points, i.e. lag=1, are used for the autoregression. Other lags can be used by specifying neighbours as a vector of integers.
linear
a logical (or a vector of logicals) indicating wether a linear trend β (or a linear trend β_i for each unit) is included
nseason
Integer number of Fourier frequencies; if nseason is a vector of integers, each unit i gets its own seasonal parameters
negbin
if "single" negative binomial rather than poisson is used, if "multiple" unit-specific overdispersion parameters are used.
proportion
see details in meanResponse
lag.range
determines which observations are used to fit the model
thetastart vector with starting values for all parameters specified in the control object (for optim).
verbose if true information about convergence is printed

Details

Note that for the time being this function is not a surveillance algorithm, but only a modelling approach as described in the Held et. al (2005) paper.

Value

ahg Returns an object of class ah with elements
    coefficients
    estimated parameters
    se
    estimated standard errors
    cov
    covariance matrix
    loglikelihood
    loglikelihood
    convergence
    logical indicating whether optim converged or not
    fitted.values
    fitted mean values μ_it
    control
    specified control object
    disProgObj
    specified disProg-object
    lag
    which lag was used for the autoregressive parameters lambda and phi
    nObs
    number of observations used for fitting the model

Author(s)

M. Paul, L. Held, M. Höhle

Source

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.

See Also

meanResponse

Examples


# univariate time series: salmonella agona cases 
data(salmonella.agona)
salmonella <- create.disProg(week=1:length(salmonella.agona$observed),
                             observed=salmonella.agona$observed, 
                             state=salmonella.agona$state)

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

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

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

# different starting values for 
# theta = (lambda, beta, gamma_1, gamma_2, psi)
startValues <- c(0.1, rep(0, 3), 1)
algo.hhh(measles.weser, control=model1, 
                 thetastart=startValues)

# include autoregressive parameter phi for adjacent "Kreise"
model2 <- list(lambda=TRUE, neighbours=TRUE, 
               linear=FALSE, nseason=1, 
               negbin="single")
algo.hhh(measles.weser, control=model2)
                  
## 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)


[Package surveillance version 1.1-2 Index]