CRAN Package Check Results for Package simsalapar

Last updated on 2024-08-09 12:49:35 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.0-12 5.22 66.13 71.35 ERROR
r-devel-linux-x86_64-debian-gcc 1.0-12 3.97 49.85 53.82 ERROR
r-devel-linux-x86_64-fedora-clang 1.0-12 121.70 OK
r-devel-linux-x86_64-fedora-gcc 1.0-12 114.90 OK
r-devel-windows-x86_64 1.0-12 7.00 101.00 108.00 NOTE
r-patched-linux-x86_64 1.0-12 6.91 66.40 73.31 OK
r-release-linux-x86_64 1.0-12 4.94 67.88 72.82 OK
r-release-macos-arm64 1.0-12 49.00 NOTE
r-release-macos-x86_64 1.0-12 76.00 NOTE
r-release-windows-x86_64 1.0-12 8.00 101.00 109.00 OK
r-oldrel-macos-arm64 1.0-12 66.00 NOTE
r-oldrel-macos-x86_64 1.0-12 127.00 NOTE
r-oldrel-windows-x86_64 1.0-12 8.00 128.00 136.00 OK

Check Details

Version: 1.0-12
Check: package dependencies
Result: NOTE Package suggested but not available for checking: ‘copula’ Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc

Version: 1.0-12
Check: Rd cross-references
Result: NOTE Found the following Rd file(s) with Rd \link{} targets missing package anchors: device.Rd: pdf.end Please provide package anchors for all Rd \link{} targets not in the package itself and the base packages. Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-windows-x86_64

Version: 1.0-12
Check: tests
Result: ERROR Running ‘doExtras.R’ [1s/1s] Comparing ‘doExtras.Rout’ to ‘doExtras.Rout.save’ ... OK Running ‘getArray-swap.R’ [1s/1s] Running ‘tst-wrongs.R’ [22s/48s] Running ‘tstTGforecasts.R’ [5s/15s] Running ‘tstVaRsuperadd.R’ [1s/1s] Running ‘varlist.R’ [1s/2s] Running the tests in ‘tests/tstVaRsuperadd.R’ failed. Complete output: > #### A "fast" and simplified version of demo(VaRsuperadd) > #### see ../demo/VaRsuperadd.R > #### ~~~~~~~~~~~~~~~~~~~~~ > > require(simsalapar) Loading required package: simsalapar > source(system.file("xtraR/assertErr-etc.R", package="simsalapar", mustWork=TRUE)) > > ## Must be fast, rather than "interesting": > n.obs <- 16 > n.alpha <- 8 > doExtras <- FALSE > > demo(VaRsuperadd) # crucial part! demo(VaRsuperadd) ---- ~~~~~~~~~~~ > ## Copyright Marius Hofert > > ### Goal: Simulation study for determining superadditivity of VaR > ### Submit via (for example): > ### bsub -N -W 01:00 -n 48 -R "select[model==Opteron8380]" -R "span[ptile=16]" \ > ### mpirun -n 1 R CMD BATCH Brutus_demo.R > > > ### 0) Setup ################################################################### > > usr <- Sys.info()[["user"]] # better portability than Sys.getenv("USER") > if(exists("n.obs") && is.numeric(n.obs) && + exists("n.alpha") && is.numeric(n.alpha)) { + cat(">>> Using n.obs=", n.obs, ", n.alpha=", n.alpha, " <<<\n", sep="") + } else { + ## user specific settings + n.obs <- 100 # default + n.alpha <- 32 + switch(usr, + "hofertj" = { # ETH Brutus + setwd("/cluster/home/math/hofertj/VaRsuperadd") + .libPaths("~/R/library") + n.obs <- 1e4 + n.alpha <- 128 + }, + "mhofert" = { + n.obs <- 1e4 # n=1e4 ~ 4min (standard notebook) + n.alpha <- 128 + }, + "maechler" = {} + ) + } >>> Using n.obs=16, n.alpha=8 <<< > if(n.alpha > n.obs) + stop("number of quantiles, n.alpha, must be smaller than the sample size, n.obs") > if(!exists("doExtras")) doExtras <- simsalapar:::doExtras() > doExtras [1] FALSE > ## load packages > require(simsalapar) > ## list of variables > varList <- + varlist( + ## sample size + n = list(value = n.obs), + ## dimensions, and weights (vector) for each d + d = list(type="grid", value = c(4, 20, 100)), + ## copula family names + family = list(type="grid", expr = quote(C), + value = c("normal", "t", "Clayton", "Gumbel")), # t = t_4 + ## dependencies by Kendall's tau + tau = list(type="grid", value = c(0.2, 0.5, 0.8)), + ## margins + qmargin = list(type="inner", expr = quote(F[j]), + value = c(norm = qnorm, + t4 = function(p) qt(p, df=4), + Par2 = function(p) (1-p)^(-1/2))), # Pareto(2) + ## VaR confidence levels + alpha = list(type="inner", value = 0:n.alpha/n.alpha)) > ### 1) Functions ############################################################### > > ##' @title Function to Compute F_{X_1+..+X_d}(d*F_1^-(\alpha)) > ##' @author Marius Hofert > doOne <- function(n, d, family, tau, qmargin, alpha) + { + ## checks (and load required packages here for parallel computing later on) + ## stopifnot(require(copula)) + ## Note: This require() affects run time due to loading copula once on each + ## node, but this can easily be identified by *robust* analysis of all + ## run times (or is negligible due to much larger run times of the jobs) + ## or, as another alternative, can be avoided by using initExpr (see below) + + cop <- switch(family, + "normal" = + ellipCopula("normal", param=iTau(ellipCopula("normal"), tau=tau), + dim=d), + "t" = + ellipCopula("t", param=iTau(ellipCopula("t"), tau=tau), dim=d), + "Clayton" = + onacopulaL("Clayton", list(th=iTau(archmCopula("clayton"), tau), + seq_len(d))), + "Gumbel" = + onacopulaL("Gumbel", list(th=iTau(archmCopula("gumbel"), tau), + seq_len(d))), + stop("unsupported 'family'")) + U <- rCopula(n, copula=cop) + + ## compute F_{X_1+..+X_d}(d*F_1^-(\alpha)) for all confidence levels alpha + ## => VaR_alpha superadditive <=> F_{X_1+..+X_d}(d*F_1^-(\alpha)) - alpha < 0 + t(sapply(qmargin, function(FUN) ecdf(rowSums(FUN(U)))(d*FUN(alpha)) - alpha)) + ## note: t() is important here, since, otherwise, the order of the variables + ## ---- would not be correct (=> check should reveal this) + } > ### 2) Main #################################################################### > > ## check doOne > > ## manually > require(copula) # for the following call of doOne() Loading required package: copula > nonGr <- get.nonGrids(varList)$nonGrids > dd <- doOne(n= min(nonGr$n, 100), d=4, family="Clayton", tau=0.5, + qmargin=nonGr$qmargin, alpha=nonGr$alpha) Error in onacopulaL("Clayton", list(th = iTau(archmCopula("clayton"), : could not find function "onacopulaL" Calls: demo -> source -> withVisible -> eval -> eval -> doOne In addition: Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'copula' Execution halted Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.0-12
Check: tests
Result: ERROR Running ‘doExtras.R’ [0s/1s] Comparing ‘doExtras.Rout’ to ‘doExtras.Rout.save’ ... OK Running ‘getArray-swap.R’ [1s/1s] Running ‘tst-wrongs.R’ [17s/40s] Running ‘tstTGforecasts.R’ [5s/12s] Running ‘tstVaRsuperadd.R’ [0s/1s] Running ‘varlist.R’ [1s/1s] Running the tests in ‘tests/tstVaRsuperadd.R’ failed. Complete output: > #### A "fast" and simplified version of demo(VaRsuperadd) > #### see ../demo/VaRsuperadd.R > #### ~~~~~~~~~~~~~~~~~~~~~ > > require(simsalapar) Loading required package: simsalapar > source(system.file("xtraR/assertErr-etc.R", package="simsalapar", mustWork=TRUE)) > > ## Must be fast, rather than "interesting": > n.obs <- 16 > n.alpha <- 8 > doExtras <- FALSE > > demo(VaRsuperadd) # crucial part! demo(VaRsuperadd) ---- ~~~~~~~~~~~ > ## Copyright Marius Hofert > > ### Goal: Simulation study for determining superadditivity of VaR > ### Submit via (for example): > ### bsub -N -W 01:00 -n 48 -R "select[model==Opteron8380]" -R "span[ptile=16]" \ > ### mpirun -n 1 R CMD BATCH Brutus_demo.R > > > ### 0) Setup ################################################################### > > usr <- Sys.info()[["user"]] # better portability than Sys.getenv("USER") > if(exists("n.obs") && is.numeric(n.obs) && + exists("n.alpha") && is.numeric(n.alpha)) { + cat(">>> Using n.obs=", n.obs, ", n.alpha=", n.alpha, " <<<\n", sep="") + } else { + ## user specific settings + n.obs <- 100 # default + n.alpha <- 32 + switch(usr, + "hofertj" = { # ETH Brutus + setwd("/cluster/home/math/hofertj/VaRsuperadd") + .libPaths("~/R/library") + n.obs <- 1e4 + n.alpha <- 128 + }, + "mhofert" = { + n.obs <- 1e4 # n=1e4 ~ 4min (standard notebook) + n.alpha <- 128 + }, + "maechler" = {} + ) + } >>> Using n.obs=16, n.alpha=8 <<< > if(n.alpha > n.obs) + stop("number of quantiles, n.alpha, must be smaller than the sample size, n.obs") > if(!exists("doExtras")) doExtras <- simsalapar:::doExtras() > doExtras [1] FALSE > ## load packages > require(simsalapar) > ## list of variables > varList <- + varlist( + ## sample size + n = list(value = n.obs), + ## dimensions, and weights (vector) for each d + d = list(type="grid", value = c(4, 20, 100)), + ## copula family names + family = list(type="grid", expr = quote(C), + value = c("normal", "t", "Clayton", "Gumbel")), # t = t_4 + ## dependencies by Kendall's tau + tau = list(type="grid", value = c(0.2, 0.5, 0.8)), + ## margins + qmargin = list(type="inner", expr = quote(F[j]), + value = c(norm = qnorm, + t4 = function(p) qt(p, df=4), + Par2 = function(p) (1-p)^(-1/2))), # Pareto(2) + ## VaR confidence levels + alpha = list(type="inner", value = 0:n.alpha/n.alpha)) > ### 1) Functions ############################################################### > > ##' @title Function to Compute F_{X_1+..+X_d}(d*F_1^-(\alpha)) > ##' @author Marius Hofert > doOne <- function(n, d, family, tau, qmargin, alpha) + { + ## checks (and load required packages here for parallel computing later on) + ## stopifnot(require(copula)) + ## Note: This require() affects run time due to loading copula once on each + ## node, but this can easily be identified by *robust* analysis of all + ## run times (or is negligible due to much larger run times of the jobs) + ## or, as another alternative, can be avoided by using initExpr (see below) + + cop <- switch(family, + "normal" = + ellipCopula("normal", param=iTau(ellipCopula("normal"), tau=tau), + dim=d), + "t" = + ellipCopula("t", param=iTau(ellipCopula("t"), tau=tau), dim=d), + "Clayton" = + onacopulaL("Clayton", list(th=iTau(archmCopula("clayton"), tau), + seq_len(d))), + "Gumbel" = + onacopulaL("Gumbel", list(th=iTau(archmCopula("gumbel"), tau), + seq_len(d))), + stop("unsupported 'family'")) + U <- rCopula(n, copula=cop) + + ## compute F_{X_1+..+X_d}(d*F_1^-(\alpha)) for all confidence levels alpha + ## => VaR_alpha superadditive <=> F_{X_1+..+X_d}(d*F_1^-(\alpha)) - alpha < 0 + t(sapply(qmargin, function(FUN) ecdf(rowSums(FUN(U)))(d*FUN(alpha)) - alpha)) + ## note: t() is important here, since, otherwise, the order of the variables + ## ---- would not be correct (=> check should reveal this) + } > ### 2) Main #################################################################### > > ## check doOne > > ## manually > require(copula) # for the following call of doOne() Loading required package: copula > nonGr <- get.nonGrids(varList)$nonGrids > dd <- doOne(n= min(nonGr$n, 100), d=4, family="Clayton", tau=0.5, + qmargin=nonGr$qmargin, alpha=nonGr$alpha) Error in onacopulaL("Clayton", list(th = iTau(archmCopula("clayton"), : could not find function "onacopulaL" Calls: demo -> source -> withVisible -> eval -> eval -> doOne In addition: Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'copula' Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.0-12
Check: package dependencies
Result: NOTE Package suggested but not available for checking: ‘Rmpi’ Flavors: r-release-macos-arm64, r-release-macos-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64

Version: 1.0-12
Check: Rd cross-references
Result: NOTE Package unavailable to check Rd xrefs: ‘Rmpi’ Flavors: r-release-macos-arm64, r-release-macos-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64