Running examples in 'surveillance-Ex.R' failed
The error most likely occurred in:

> ### Name: hhh4
> ### Title: Fitting HHH Models with Random Effects and Neighbourhood
> ###   Structure
> ### Aliases: hhh4
> ### Keywords: ts regression
> 
> ### ** Examples
> 
> ######################
> ## Univariate examples
> ######################
> 
> ### weekly counts of salmonella agona cases, UK, 1990-1995
> 
> data("salmonella.agona")
> ## convert old "disProg" to new "sts" data class
> salmonella <- disProg2sts(salmonella.agona)
> salmonella
-- An object of class sts -- 
freq:		 52 
start:		 1990 1 
dim(observed):	 312 1 

Head of observed:
     observed1
[1,]         1
> plot(salmonella)
> 
> ## generate formula for an (endemic) time trend and seasonality
> f.end <- addSeason2formula(f = ~1 + t, S = 1, period = 52)
> f.end
~1 + t + sin(2 * pi * t/52) + cos(2 * pi * t/52)
> ## specify a simple autoregressive negative binomial model
> model1 <- list(ar = list(f = ~1), end = list(f = f.end), family = "NegBin1")
> ## fit this model to the data
> res <- hhh4(salmonella, model1)
> ## summarize the model fit
> summary(res, idx2Exp=1, amplitudeShift=TRUE, maxEV=TRUE)

Call: 
hhh4(stsObj = salmonella, control = model1)

Coefficients:
                      Estimate    Std. Error
exp(ar.1)              0.2678139   0.0596124
end.1                  0.7697737   0.1240722
end.t                 -0.0007282   0.0006345
end.A(2 * pi * t/52)   0.5841434   0.0810975
end.s(2 * pi * t/52)  -2.6961872   0.0303381
overdisp               0.1905914   0.0467357

Epidemic dominant eigenvalue:  0.27 

Log-likelihood:   -620.23 
AIC:              1252.46 
BIC:              1274.9 

Number of units:        1 
Number of time points:  311 

> plot(res)
> plot(res, type = "season", components = "end")
> 
> 
> ### weekly counts of meningococcal infections, Germany, 2001-2006
> 
> data("influMen")
> fluMen <- disProg2sts(influMen)
> meningo <- fluMen[, "meningococcus"]
> meningo
-- An object of class sts -- 
freq:		 52 
start:		 2001 1 
dim(observed):	 312 1 

Head of observed:
     meningococcus
[1,]             4
> plot(meningo)
> 
> ## again a simple autoregressive NegBin model with endemic seasonality
> meningoFit <- hhh4(stsObj = meningo, control = list(
+     ar = list(f = ~1),
+     end = list(f = addSeason2formula(f = ~1, S = 1, period = 52)),
+     family = "NegBin1"
+ ))
> 
> summary(meningoFit, idx2Exp=TRUE, amplitudeShift=TRUE, maxEV=TRUE)

Call: 
hhh4(stsObj = meningo, control = list(ar = list(f = ~1), end = list(f = addSeason2formula(f = ~1, 
    S = 1, period = 52)), family = "NegBin1"))

Coefficients:
                      Estimate  Std. Error
exp(ar.1)             0.16471   0.05513   
exp(end.1)            8.05551   0.55271   
end.A(2 * pi * t/52)  0.43158   0.03793   
end.s(2 * pi * t/52)  0.65109   0.04841   
overdisp              0.04917   0.01168   

Epidemic dominant eigenvalue:  0.16 

Log-likelihood:   -845.61 
AIC:              1701.23 
BIC:              1719.93 

Number of units:        1 
Number of time points:  311 

> plot(meningoFit)
> plot(meningoFit, type = "season", components = "end")
> 
> 
> ########################
> ## Multivariate examples
> ########################
> 
> ### bivariate analysis of influenza and meningococcal infections
> ### (see Paul et al, 2008)
> 
> plot(fluMen, same.scale = FALSE)
>      
> ## Fit a negative binomial model with
> ## - autoregressive component: disease-specific intercepts
> ## - neighbour-driven component: only transmission from flu to men
> ## - endemic component: S=3 and S=1 sine/cosine pairs for flu and men, respectively
> ## - disease-specific overdispersion
> 
> WfluMen <- neighbourhood(fluMen)
> WfluMen["meningococcus","influenza"] <- 0
> WfluMen
              influenza meningococcus
influenza             0             1
meningococcus         0             0
> f.end_fluMen <- addSeason2formula(f = ~ -1 + fe(1, which = c(TRUE, TRUE)),
+                                   S = c(3, 1), period = 52)
> f.end_fluMen
~-1 + fe(1, which = c(TRUE, TRUE)) + fe(sin(2 * pi * t/52), which = c(TRUE, 
    TRUE)) + fe(cos(2 * pi * t/52), which = c(TRUE, TRUE)) + 
    fe(sin(4 * pi * t/52), which = c(TRUE, FALSE)) + fe(cos(4 * 
    pi * t/52), which = c(TRUE, FALSE)) + fe(sin(6 * pi * t/52), 
    which = c(TRUE, FALSE)) + fe(cos(6 * pi * t/52), which = c(TRUE, 
    FALSE))
> fluMenFit <- hhh4(fluMen, control = list(
+     ar = list(f = ~ -1 + fe(1, unitSpecific = TRUE)),
+     ne = list(f = ~ 1, weights = WfluMen),
+     end = list(f = f.end_fluMen),
+     family = "NegBinM"))

Execution halted