CRAN Package Check Results for Package cvar

Last updated on 2025-12-06 00:48:36 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.5 2.15 42.60 44.75 OK
r-devel-linux-x86_64-debian-gcc 0.5 1.72 25.45 27.17 ERROR
r-devel-linux-x86_64-fedora-clang 0.5 66.38 OK
r-devel-linux-x86_64-fedora-gcc 0.5 74.93 OK
r-devel-windows-x86_64 0.5 3.00 74.00 77.00 OK
r-patched-linux-x86_64 0.5 2.46 37.41 39.87 OK
r-release-linux-x86_64 0.5 1.92 40.02 41.94 OK
r-release-macos-arm64 0.5 OK
r-release-macos-x86_64 0.5 3.00 73.00 76.00 OK
r-release-windows-x86_64 0.5 4.00 72.00 76.00 OK
r-oldrel-macos-arm64 0.5 OK
r-oldrel-macos-x86_64 0.5 2.00 44.00 46.00 OK
r-oldrel-windows-x86_64 0.5 4.00 81.00 85.00 OK

Check Details

Version: 0.5
Check: examples
Result: ERROR Running examples in ‘cvar-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: predict.garch1c1 > ### Title: Prediction for GARCH(1,1) time series > ### Aliases: predict.garch1c1 > > ### ** Examples > > op <- options(digits = 4) > > ## set up a model and simulate a time series > mo <- GarchModel(omega = 0.4, alpha = 0.3, beta = 0.5) > a1 <- sim_garch1c1(mo, n = 1000, n.start = 100, seed = 20220305) > > ## predictions for T+1,...,T+5 (T = time of last value) > ## Nsim is small to reduce the load on CRAN, usually Nsim is larger. > a.pred <- predict(mo, n.ahead = 5, Nsim = 1000, eps = a1$eps, + sigmasq = a1$h, seed = 1234) > > ## preditions for the time series > a.pred$eps [1] 0 0 0 0 0 > > ## PI's for eps - plug-in and simulated > a.pred$pi_plugin lwr upr [1,] -2.484 2.484 [2,] -2.544 2.544 [3,] -2.591 2.591 [4,] -2.628 2.628 [5,] -2.658 2.658 > a.pred$pi_sim 2.5% 97.5% [1,] -2.447 2.465 [2,] -2.662 2.559 [3,] -2.426 2.624 [4,] -2.538 2.370 [5,] -2.645 2.637 > > ## a DIY calculation of PI's using the simulated sample paths > t(apply(a.pred$dist_sim$eps, 1, function(x) quantile(x, c(0.025, 0.975)))) 2.5% 97.5% [1,] -2.447 2.465 [2,] -2.662 2.559 [3,] -2.426 2.624 [4,] -2.538 2.370 [5,] -2.645 2.637 > > ## further investigate the predictive distributions > t(apply(a.pred$dist_sim$eps, 1, function(x) summary(x))) Min. 1st Qu. Median Mean 3rd Qu. Max. [1,] -3.922 -0.8366 -0.064571 -0.004804 0.8683 4.050 [2,] -6.755 -0.8333 0.055137 0.012828 0.8895 4.320 [3,] -5.198 -0.8541 -0.015145 -0.004674 0.8138 4.290 [4,] -3.786 -0.8596 -0.001705 -0.029519 0.7609 4.241 [5,] -5.000 -0.8314 -0.019039 -0.016285 0.7956 4.860 > > ## compare predictive densities for horizons 2 and 5: > h2 <- a.pred$dist_sim$eps[2, ] > h5 <- a.pred$dist_sim$eps[5, ] > main <- "Predictive densities: horizons 2 (blue) and 5 (black)" > plot(density(h5), main = main) > lines(density(h2), col = "blue") > > ## predictions of sigma_t^2 > a.pred$h [1] 1.606 1.685 1.748 1.798 1.839 > > ## plug-in predictions of sigma_t > sqrt(a.pred$h) [1] 1.267 1.298 1.322 1.341 1.356 > > ## simulation predictive densities (PD's) of sigma_t for horizons 2 and 5: > h2 <- sqrt(a.pred$dist_sim$h[2, ]) > h5 <- sqrt(a.pred$dist_sim$h[5, ]) > main <- "PD's of sigma_t for horizons 2 (blue) and 5 (black)" > plot(density(h2), col = "blue", main = main) > lines(density(h5)) > > ## VaR and ES for different horizons > cbind(h = 1:5, + VaR = apply(a.pred$dist_sim$eps, 1, function(x) VaR(x, c(0.05))), + ES = apply(a.pred$dist_sim$eps, 1, function(x) ES(x, c(0.05))) ) h VaR ES [1,] 1 2.077 2.593 [2,] 2 2.075 2.972 [3,] 3 2.106 2.651 [4,] 4 2.066 2.680 [5,] 5 2.167 2.886 > > ## fit a GARCH(1,1) model to exchange rate data and predict > gmo1 <- fGarch::garchFit(formula = ~garch(1, 1), data = fGarch::dem2gbp, + include.mean = FALSE, cond.dist = "norm", trace = FALSE) Error in loadNamespace(x) : there is no package called ‘fGarch’ Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.5
Check: tests
Result: ERROR Running ‘testthat.R’ [1s/1s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(cvar) > > test_check("cvar") Failed with error: 'there is no package called 'fGarch'' Saving _problems/test-garch-54.R [ FAIL 1 | WARN 0 | SKIP 0 | PASS 20 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-garch.R:54:5'): garch1c1 related functions work ok ───────────── Error in `.get_dist_elem("std", "r")`: requested distribution property needs package fGarch please install package 'fGarch' and try again Backtrace: ▆ 1. └─cvar:::.get_dist_elem("std", "r") at test-garch.R:54:5 [ FAIL 1 | WARN 0 | SKIP 0 | PASS 20 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.5
Check: HTML version of manual
Result: NOTE Skipping checking math rendering: package 'V8' unavailable Flavor: r-devel-linux-x86_64-debian-gcc