- using R Under development (unstable) (2024-04-21 r86458)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
Debian clang version 18.1.0 (rc4-1)
Debian flang-new version 18.1.0 (rc4-1)
- running under: Debian GNU/Linux trixie/sid
- using session charset: UTF-8
- checking for file ‘bsts/DESCRIPTION’ ... OK
- this is package ‘bsts’ version ‘0.9.10’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking serialization versions ... OK
- checking whether package ‘bsts’ can be installed ... OK
See the install log for details.
- used C++ compiler: ‘Debian clang version 18.1.0 (rc4-1)’
- checking package directory ... OK
- checking for future file timestamps ... 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 code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [1s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the package can be unloaded cleanly ... [1s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [1s/1s] 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 ... [23s/29s] OK
- checking Rd files ... [1s/2s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... 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 ... [0s/1s] OK
- checking data for ASCII and uncompressed saves ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking compilation flags in Makevars ... OK
- checking for GNU extensions in Makefiles ... OK
- checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
- checking use of PKG_*FLAGS in Makefiles ... OK
- checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compilation flags used ... OK
- checking compiled code ... OK
- checking examples ... [73s/81s] ERROR
Running examples in ‘bsts-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: regression.holiday
> ### Title: Regression Based Holiday Models
> ### Aliases: AddRegressionHoliday RegressionHolidayStateModel
> ### AddHierarchicalRegressionHoliday
> ### HierarchicalRegressionHolidayStateModel
> ### Keywords: models
>
> ### ** Examples
>
> trend <- cumsum(rnorm(730, 0, .1))
> dates <- seq.Date(from = as.Date("2014-01-01"), length = length(trend), by = "day")
> y <- zoo(trend + rnorm(length(trend), 0, .2), dates)
>
> AddHolidayEffect <- function(y, dates, effect) {
+ ## Adds a holiday effect to simulated data.
+ ## Args:
+ ## y: A zoo time series, with Dates for indices.
+ ## dates: The dates of the holidays.
+ ## effect: A vector of holiday effects of odd length. The central effect is
+ ## the main holiday, with a symmetric influence window on either side.
+ ## Returns:
+ ## y, with the holiday effects added.
+ time <- dates - (length(effect) - 1) / 2
+ for (i in 1:length(effect)) {
+ y[time] <- y[time] + effect[i]
+ time <- time + 1
+ }
+ return(y)
+ }
>
> ## Define some holidays.
> memorial.day <- NamedHoliday("MemorialDay")
> memorial.day.effect <- c(.3, 3, .5)
> memorial.day.dates <- as.Date(c("2014-05-26", "2015-05-25"))
> y <- AddHolidayEffect(y, memorial.day.dates, memorial.day.effect)
>
> presidents.day <- NamedHoliday("PresidentsDay")
> presidents.day.effect <- c(.5, 2, .25)
> presidents.day.dates <- as.Date(c("2014-02-17", "2015-02-16"))
> y <- AddHolidayEffect(y, presidents.day.dates, presidents.day.effect)
>
> labor.day <- NamedHoliday("LaborDay")
> labor.day.effect <- c(1, 2, 1)
> labor.day.dates <- as.Date(c("2014-09-01", "2015-09-07"))
> y <- AddHolidayEffect(y, labor.day.dates, labor.day.effect)
>
> ## The holidays can be in any order.
> holiday.list <- list(memorial.day, labor.day, presidents.day)
>
> ## In a real example you'd want more than 100 MCMC iterations.
> niter <- 100
>
> ## Fit the model
> ss <- AddLocalLevel(list(), y)
> ss <- AddRegressionHoliday(ss, y, holiday.list = holiday.list)
> model <- bsts(y, state.specification = ss, niter = niter)
=-=-=-=-= Iteration 0 Tue Apr 23 00:08:50 2024 =-=-=-=-=
=-=-=-=-= Iteration 10 Tue Apr 23 00:08:50 2024 =-=-=-=-=
=-=-=-=-= Iteration 20 Tue Apr 23 00:08:50 2024 =-=-=-=-=
=-=-=-=-= Iteration 30 Tue Apr 23 00:08:50 2024 =-=-=-=-=
=-=-=-=-= Iteration 40 Tue Apr 23 00:08:50 2024 =-=-=-=-=
=-=-=-=-= Iteration 50 Tue Apr 23 00:08:51 2024 =-=-=-=-=
=-=-=-=-= Iteration 60 Tue Apr 23 00:08:51 2024 =-=-=-=-=
=-=-=-=-= Iteration 70 Tue Apr 23 00:08:51 2024 =-=-=-=-=
=-=-=-=-= Iteration 80 Tue Apr 23 00:08:51 2024 =-=-=-=-=
=-=-=-=-= Iteration 90 Tue Apr 23 00:08:51 2024 =-=-=-=-=
>
> ## Plot all model state components.
> plot(model, "comp")
>
> ## Plot the specific holiday state component.
> plot(ss[[2]], model)
>
> ## Try again with some shrinkage. With only 3 holidays there won't be much
> ## shrinkage.
> ss2 <- AddLocalLevel(list(), y)
>
> ## Plot the specific holiday state component.
> ss2 <- AddHierarchicalRegressionHoliday(ss2, y, holiday.list = holiday.list)
> model2 <- bsts(y, state.specification = ss2, niter = niter)
=-=-=-=-= Iteration 0 Tue Apr 23 00:08:52 2024 =-=-=-=-=
=-=-=-=-= Iteration 10 Tue Apr 23 00:08:52 2024 =-=-=-=-=
=-=-=-=-= Iteration 20 Tue Apr 23 00:08:53 2024 =-=-=-=-=
=-=-=-=-= Iteration 30 Tue Apr 23 00:08:53 2024 =-=-=-=-=
=-=-=-=-= Iteration 40 Tue Apr 23 00:08:53 2024 =-=-=-=-=
=-=-=-=-= Iteration 50 Tue Apr 23 00:08:53 2024 =-=-=-=-=
=-=-=-=-= Iteration 60 Tue Apr 23 00:08:53 2024 =-=-=-=-=
=-=-=-=-= Iteration 70 Tue Apr 23 00:08:53 2024 =-=-=-=-=
=-=-=-=-= Iteration 80 Tue Apr 23 00:08:53 2024 =-=-=-=-=
=-=-=-=-= Iteration 90 Tue Apr 23 00:08:54 2024 =-=-=-=-=
>
> plot(model2, "comp")
Error in apply(curves, 2, quantile, probs = qtl, na.rm = TRUE) :
dim(X) must have a positive length
Calls: plot ... .PlotStateContribution -> PlotDynamicDistribution -> t -> apply
Execution halted
- checking PDF version of manual ... [11s/14s] OK
- checking HTML version of manual ... [6s/9s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 1 ERROR