* using log directory 'd:/Rcompile/CRANpkg/local/4.3/surveillance.Rcheck' * using R version 4.3.3 (2024-02-29 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * R was compiled by gcc.exe (GCC) 12.3.0 GNU Fortran (GCC) 12.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * using option '--no-vignettes' * checking for file 'surveillance/DESCRIPTION' ... OK * this is package 'surveillance' version '1.23.0' * checking package namespace information ... OK * checking package dependencies ... NOTE Package suggested but not available for checking: 'INLA' * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'surveillance' can be installed ... OK * used C compiler: 'gcc.exe (GCC) 12.3.0' * used C++ compiler: 'g++.exe (GCC) 12.3.0' * checking installed package size ... NOTE installed size is 7.5Mb sub-directories of 1Mb or more: R 1.7Mb doc 2.3Mb libs 1.1Mb * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [3s] OK * checking whether the package can be loaded with stated dependencies ... [3s] OK * checking whether the package can be unloaded cleanly ... [3s] OK * checking whether the namespace can be loaded with stated dependencies ... [3s] OK * checking whether the namespace can be unloaded cleanly ... [3s] OK * checking loading without being on the library search path ... [3s] OK * checking startup messages can be suppressed ... [3s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [63s] OK * checking Rd files ... [8s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... [2s] OK * checking data for ASCII and uncompressed saves ... OK * checking R/sysdata.rda ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking sizes of PDF files under 'inst/doc' ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [29s] ERROR 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 * checking for unstated dependencies in 'tests' ... OK * checking tests ... [19s] OK Running 'tinytest.R' [19s] * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... [29s] OK * checking HTML version of manual ... [41s] OK * DONE Status: 1 ERROR, 2 NOTEs