R Under development (unstable) (2024-11-22 r87365 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(BayesianFitForecast) > > test_check("BayesianFitForecast") > rm(list = ls()) > library(readxl) > library(rstan) Loading required package: StanHeaders rstan version 2.32.6 (Stan version 2.32.2) For execution on a local, multicore CPU with excess RAM we recommend calling options(mc.cores = parallel::detectCores()). To avoid recompilation of unchanged Stan programs, we recommend calling rstan_options(auto_write = TRUE) For within-chain threading using `reduce_sum()` or `map_rect()` Stan functions, change `threads_per_chain` option: rstan_options(threads_per_chain = 1) Do not specify '-march=native' in 'LOCAL_CPPFLAGS' or a Makevars file > source("D:/RCompile/CRANincoming/R-devel/lib/BayesianFitForecast/extdata/option.R") > source("D:/RCompile/CRANincoming/R-devel/lib/BayesianFitForecast/scripts/diff.R") > source("D:/RCompile/CRANincoming/R-devel/lib/BayesianFitForecast/scripts/ode_rhs.R") > source("D:/RCompile/CRANincoming/R-devel/lib/BayesianFitForecast/scripts/stancreator.R") > stan_file <- "ode_model.stan" > stan_code <- generate_stan_file() Removed file: ode_model.stan > writeLines(stan_code, stan_file) > Mydata <- read_excel(paste0(cadfilename1, ".xlsx")) > for (i in 1:length(fitting_index)) { + assign(paste0("actualcases", i), Mydata[[paste0("cases", + i)]]) + } > model <- stan_model("ode_model.stan") > stan_code <- "ode_model.stan" > for (calibrationperiod in calibrationperiods) { + for (i in 1:length(fitting_index)) { + assign(paste0("cases", i), as.integer(get(paste .... [TRUNCATED] SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 1). Chain 1: Chain 1: Gradient evaluation took 0.000323 seconds Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 3.23 seconds. Chain 1: Adjust your expectations accordingly! Chain 1: Chain 1: Chain 1: Iteration: 1 / 1000 [ 0%] (Warmup) Chain 1: Iteration: 100 / 1000 [ 10%] (Warmup) Chain 1: Iteration: 200 / 1000 [ 20%] (Warmup) Chain 1: Iteration: 300 / 1000 [ 30%] (Warmup) Chain 1: Iteration: 400 / 1000 [ 40%] (Warmup) Chain 1: Iteration: 500 / 1000 [ 50%] (Warmup) Chain 1: Iteration: 501 / 1000 [ 50%] (Sampling) Chain 1: Iteration: 600 / 1000 [ 60%] (Sampling) Chain 1: Iteration: 700 / 1000 [ 70%] (Sampling) Chain 1: Iteration: 800 / 1000 [ 80%] (Sampling) Chain 1: Iteration: 900 / 1000 [ 90%] (Sampling) Chain 1: Iteration: 1000 / 1000 [100%] (Sampling) Chain 1: Chain 1: Elapsed Time: 0.587 seconds (Warm-up) Chain 1: 0.541 seconds (Sampling) Chain 1: 1.128 seconds (Total) Chain 1: SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 2). Chain 2: Chain 2: Gradient evaluation took 0.000239 seconds Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 2.39 seconds. Chain 2: Adjust your expectations accordingly! Chain 2: Chain 2: Chain 2: Iteration: 1 / 1000 [ 0%] (Warmup) Chain 2: Iteration: 100 / 1000 [ 10%] (Warmup) Chain 2: Iteration: 200 / 1000 [ 20%] (Warmup) Chain 2: Iteration: 300 / 1000 [ 30%] (Warmup) Chain 2: Iteration: 400 / 1000 [ 40%] (Warmup) Chain 2: Iteration: 500 / 1000 [ 50%] (Warmup) Chain 2: Iteration: 501 / 1000 [ 50%] (Sampling) Chain 2: Iteration: 600 / 1000 [ 60%] (Sampling) Chain 2: Iteration: 700 / 1000 [ 70%] (Sampling) Chain 2: Iteration: 800 / 1000 [ 80%] (Sampling) Chain 2: Iteration: 900 / 1000 [ 90%] (Sampling) Chain 2: Iteration: 1000 / 1000 [100%] (Sampling) Chain 2: Chain 2: Elapsed Time: 11.369 seconds (Warm-up) Chain 2: 0.496 seconds (Sampling) Chain 2: 11.865 seconds (Total) Chain 2: > rm(list = ls()) > library(bayesplot) This is bayesplot version 1.11.1 - Online documentation and vignettes at mc-stan.org/bayesplot - bayesplot theme set to bayesplot::theme_default() * Does _not_ affect other ggplot2 plots * See ?bayesplot_theme_set for details on theme setting > library("readxl") > library(xlsx) > library(readxl) > library(openxlsx) Attaching package: 'openxlsx' The following objects are masked from 'package:xlsx': createWorkbook, loadWorkbook, read.xlsx, saveWorkbook, write.xlsx > library(rstan) > library(ggplot2) > source("D:/RCompile/CRANincoming/R-devel/lib/BayesianFitForecast/scripts/Metric_functions.R") > source("D:/RCompile/CRANincoming/R-devel/lib/BayesianFitForecast/extdata/option.R") > Mydata <- read_excel(paste0(cadfilename1, ".xlsx")) > dir.create("output", showWarnings = FALSE) > errorstructure <- c("negativebinomial", "normal", + "poisson") > for (i in 1:length(fitting_index)) { + assign(paste0("actualcases", i), Mydata[[paste0("cases", + i)]]) + } > result_data1 <- data.frame() > result_data2 <- data.frame() > for (calibrationperiod in calibrationperiods) { + load(paste(model_name, "cal", (calibrationperiod), "fcst", + forecastinghorizon, erro .... [TRUNCATED] [ FAIL 0 | WARN 1 | SKIP 0 | PASS 5 ] [ FAIL 0 | WARN 1 | SKIP 0 | PASS 5 ] > > proc.time() user system elapsed 54.81 0.82 111.31