CRAN Package Check Results for Package mcGlobaloptim

Last updated on 2022-05-02 08:51:56 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.1 2.76 33.75 36.51 ERROR
r-devel-linux-x86_64-debian-gcc 0.1 2.04 25.34 27.38 ERROR
r-devel-linux-x86_64-fedora-clang 0.1 42.97 ERROR
r-devel-linux-x86_64-fedora-gcc 0.1 41.69 ERROR
r-devel-windows-x86_64 0.1 17.00 54.00 71.00 ERROR
r-patched-linux-x86_64 0.1 1.58 37.07 38.65 NOTE
r-release-linux-x86_64 0.1 NOTE
r-release-macos-arm64 0.1 25.00 NOTE
r-release-macos-x86_64 0.1 27.00 NOTE
r-release-windows-x86_64 0.1 5.00 53.00 58.00 NOTE
r-oldrel-macos-arm64 0.1 24.00 NOTE
r-oldrel-macos-x86_64 0.1 29.00 NOTE
r-oldrel-windows-ix86+x86_64 0.1 4.00 35.00 39.00 NOTE

Check Details

Version: 0.1
Check: R code for possible problems
Result: NOTE
    call_localoptim: no visible global function definition for 'optim'
    call_localoptim: no visible global function definition for 'nlminb'
    call_localoptim: no visible global function definition for
     'txtProgressBar'
    call_localoptim: no visible global function definition for
     'setTxtProgressBar'
    call_localoptim : <anonymous>: no visible global function definition
     for 'optim'
    call_localoptim : <anonymous>: no visible global function definition
     for 'nlminb'
    multiStartoptim: no visible global function definition for 'median'
    Undefined global functions or variables:
     median nlminb optim setTxtProgressBar txtProgressBar
    Consider adding
     importFrom("stats", "median", "nlminb", "optim")
     importFrom("utils", "setTxtProgressBar", "txtProgressBar")
    to your NAMESPACE file.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-ix86+x86_64

Version: 0.1
Check: examples
Result: ERROR
    Running examples in 'mcGlobaloptim-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: multiStartoptim
    > ### Title: Multistart global optimization using Monte Carlo and Quasi Monte
    > ### Carlo simulation.
    > ### Aliases: multiStartoptim
    >
    > ### ** Examples
    >
    > ### Example from optim :
    > # "wild" function, global minimum at about -15.81515
    > fw <- function (x)
    + {
    + 10*sin(0.3*x)*sin(1.3*x^2) + 0.00001*x^4 + 0.2*x+80
    + }
    > plot(fw, -50, 50, n = 1000, main = "optim() minimising 'wild function'")
    > (minfw <- multiStartoptim(objectivefn = fw, lower = -40,
    + upper = 40, method = "nlminb", nbtrials = 500,
    + typerunif = "sobol", verb = TRUE))
    
     |
     | | 0%
     |
     | | 1%
     |
     |= | 1%
     |
     |= | 2%
     |
     |== | 2%
     |
     |== | 3%
     |
     |=== | 4%
     |
     |=== | 5%
     |
     |==== | 5%
     |
     |==== | 6%
     |
     |===== | 7%
     |
     |===== | 8%
     |
     |====== | 8%
     |
     |====== | 9%
     |
     |======= | 9%
     |
     |======= | 10%
     |
     |======= | 11%
     |
     |======== | 11%
     |
     |======== | 12%
     |
     |========= | 12%
     |
     |========= | 13%
     |
     |========== | 14%
     |
     |========== | 15%
     |
     |=========== | 15%
     |
     |=========== | 16%
     |
     |============ | 17%
     |
     |============ | 18%
     |
     |============= | 18%
     |
     |============= | 19%
     |
     |============== | 19%
     |
     |============== | 20%
     |
     |============== | 21%
     |
     |=============== | 21%
     |
     |=============== | 22%
     |
     |================ | 22%
     |
     |================ | 23%
     |
     |================= | 24%
     |
     |================= | 25%
     |
     |================== | 25%
     |
     |================== | 26%
     |
     |=================== | 27%
     |
     |=================== | 28%
     |
     |==================== | 28%
     |
     |==================== | 29%
     |
     |===================== | 29%
     |
     |===================== | 30%
     |
     |===================== | 31%
     |
     |====================== | 31%
     |
     |====================== | 32%
     |
     |======================= | 32%
     |
     |======================= | 33%
     |
     |======================== | 34%
     |
     |======================== | 35%
     |
     |========================= | 35%
     |
     |========================= | 36%
     |
     |========================== | 37%
     |
     |========================== | 38%
     |
     |=========================== | 38%
     |
     |=========================== | 39%
     |
     |============================ | 39%
     |
     |============================ | 40%
     |
     |============================ | 41%
     |
     |============================= | 41%
     |
     |============================= | 42%
     |
     |============================== | 42%
     |
     |============================== | 43%
     |
     |=============================== | 44%
     |
     |=============================== | 45%
     |
     |================================ | 45%
     |
     |================================ | 46%
     |
     |================================= | 47%
     |
     |================================= | 48%
     |
     |================================== | 48%
     |
     |================================== | 49%
     |
     |=================================== | 49%
     |
     |=================================== | 50%
     |
     |=================================== | 51%
     |
     |==================================== | 51%
     |
     |==================================== | 52%
     |
     |===================================== | 52%
     |
     |===================================== | 53%
     |
     |====================================== | 54%
     |
     |====================================== | 55%
     |
     |======================================= | 55%
     |
     |======================================= | 56%
     |
     |======================================== | 57%
     |
     |======================================== | 58%
     |
     |========================================= | 58%
     |
     |========================================= | 59%
     |
     |========================================== | 59%
     |
     |========================================== | 60%
     |
     |========================================== | 61%
     |
     |=========================================== | 61%
     |
     |=========================================== | 62%
     |
     |============================================ | 62%
     |
     |============================================ | 63%
     |
     |============================================= | 64%
     |
     |============================================= | 65%
     |
     |============================================== | 65%
     |
     |============================================== | 66%
     |
     |=============================================== | 67%
     |
     |=============================================== | 68%
     |
     |================================================ | 68%
     |
     |================================================ | 69%
     |
     |================================================= | 69%
     |
     |================================================= | 70%
     |
     |================================================= | 71%
     |
     |================================================== | 71%
     |
     |================================================== | 72%
     |
     |=================================================== | 72%
     |
     |=================================================== | 73%
     |
     |==================================================== | 74%
     |
     |==================================================== | 75%
     |
     |===================================================== | 75%
     |
     |===================================================== | 76%
     |
     |====================================================== | 77%
     |
     |====================================================== | 78%
     |
     |======================================================= | 78%
     |
     |======================================================= | 79%
     |
     |======================================================== | 79%
     |
     |======================================================== | 80%
     |
     |======================================================== | 81%
     |
     |========================================================= | 81%
     |
     |========================================================= | 82%
     |
     |========================================================== | 82%
     |
     |========================================================== | 83%
     |
     |=========================================================== | 84%
     |
     |=========================================================== | 85%
     |
     |============================================================ | 85%
     |
     |============================================================ | 86%
     |
     |============================================================= | 87%
     |
     |============================================================= | 88%
     |
     |============================================================== | 88%
     |
     |============================================================== | 89%
     |
     |=============================================================== | 89%
     |
     |=============================================================== | 90%
     |
     |=============================================================== | 91%
     |
     |================================================================ | 91%
     |
     |================================================================ | 92%
     |
     |================================================================= | 92%
     |
     |================================================================= | 93%
     |
     |================================================================== | 94%
     |
     |================================================================== | 95%
     |
     |=================================================================== | 95%
     |
     |=================================================================== | 96%
     |
     |==================================================================== | 97%
     |
     |==================================================================== | 98%
     |
     |===================================================================== | 98%
     |
     |===================================================================== | 99%
     |
     |======================================================================| 99%
     |
     |======================================================================| 100%
    $res
    $res$par
    [1] -15.81515
    
    $res$objective
    [1] 67.46773
    
    $res$convergence
    [1] 0
    
    $res$iterations
    [1] 5
    
    $res$evaluations
    function gradient
     9 8
    
    $res$message
    [1] "both X-convergence and relative convergence (5)"
    
    
    $iteration_no
    [1] 1 2 3 7 8 15 73 131 466
    
    $startingparams_sequence
    [1] 29.4074334 9.4074334 -30.5925666 -0.5925666 -5.5925666 -15.5925666
    [7] -17.4675666 -15.2800666 -14.8113166
    
    $foundparams_sequence
    [1] 28.303752 10.609181 -29.597542 -1.190591 -4.532845 -16.117845 -15.967215
    [8] -15.661611 -15.815151
    
    $objective_val_sequence
    [1] 84.04052 81.84853 76.56611 76.39410 69.31956 67.52682 67.48679 67.47030
    [9] 67.46773
    
    > points(minfw$res$par, minfw$res$objective, pch = 8, lwd = 2, col = "red", cex = 2)
    >
    > ### Calibrating the Nelson-Siegel-Svensson model (from Gilli, Schumann (2010)) :
    > # Nelson - Siegel - Svensson model
    > NSS2 <- function(betaV, mats)
    + {
    + gam1 <- mats / betaV [5]
    + gam2 <- mats / betaV [6]
    + aux1 <- 1 - exp (- gam1)
    + aux2 <- 1 - exp (- gam2)
    + betaV[1] + betaV[2] * (aux1 / gam1) +
    + betaV[3] * (aux1 / gam1 + aux1 - 1) +
    + betaV[4] * (aux2 / gam2 + aux2 - 1)
    + }
    >
    > betaTRUE <- c(5, -2 ,5, -5 ,1 ,3)
    > mats <- c(1 ,3 ,6 ,9 ,12 ,15 ,18 ,21 ,24 ,30 ,36 ,48 ,60 ,72 ,84 ,
    + 96,108 ,120)/ 12
    > yM <- NSS2 (betaTRUE, mats)
    > dataList <- list ( yM = yM, mats = mats, model = NSS2)
    > plot (mats, yM, xlab = " maturities in years ", ylab =" yields in pct. ")
    >
    > # define objective function
    > OF <- function (betaV, dataList) {
    + mats <- dataList$mats
    + yM <- dataList$yM
    + model <- dataList$model
    + y <- model(betaV, mats)
    + aux <- y - yM
    + crossprod(aux)
    + }
    >
    > settings <- list (min = c( 0, -15, -30, -30 ,0 ,3),
    + max = c (15, 30, 30, 30 ,3 ,6), d = 6)
    > NSStest <- multiStartoptim(objectivefn = OF, data = dataList,
    + lower = settings$min,
    + upper = settings$max,
    + method = "nlminb",
    + nbtrials = 50, typerunif = "torus")
    Error in nbpar != length(upper) || lower > upper :
     'length = 6' in coercion to 'logical(1)'
    Calls: multiStartoptim
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc

Version: 0.1
Check: examples
Result: ERROR
    Running examples in ‘mcGlobaloptim-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: multiStartoptim
    > ### Title: Multistart global optimization using Monte Carlo and Quasi Monte
    > ### Carlo simulation.
    > ### Aliases: multiStartoptim
    >
    > ### ** Examples
    >
    > ### Example from optim :
    > # "wild" function, global minimum at about -15.81515
    > fw <- function (x)
    + {
    + 10*sin(0.3*x)*sin(1.3*x^2) + 0.00001*x^4 + 0.2*x+80
    + }
    > plot(fw, -50, 50, n = 1000, main = "optim() minimising 'wild function'")
    > (minfw <- multiStartoptim(objectivefn = fw, lower = -40,
    + upper = 40, method = "nlminb", nbtrials = 500,
    + typerunif = "sobol", verb = TRUE))
    
     |
     | | 0%
     |
     | | 1%
     |
     |= | 1%
     |
     |= | 2%
     |
     |== | 2%
     |
     |== | 3%
     |
     |=== | 4%
     |
     |=== | 5%
     |
     |==== | 5%
     |
     |==== | 6%
     |
     |===== | 7%
     |
     |===== | 8%
     |
     |====== | 8%
     |
     |====== | 9%
     |
     |======= | 9%
     |
     |======= | 10%
     |
     |======= | 11%
     |
     |======== | 11%
     |
     |======== | 12%
     |
     |========= | 12%
     |
     |========= | 13%
     |
     |========== | 14%
     |
     |========== | 15%
     |
     |=========== | 15%
     |
     |=========== | 16%
     |
     |============ | 17%
     |
     |============ | 18%
     |
     |============= | 18%
     |
     |============= | 19%
     |
     |============== | 19%
     |
     |============== | 20%
     |
     |============== | 21%
     |
     |=============== | 21%
     |
     |=============== | 22%
     |
     |================ | 22%
     |
     |================ | 23%
     |
     |================= | 24%
     |
     |================= | 25%
     |
     |================== | 25%
     |
     |================== | 26%
     |
     |=================== | 27%
     |
     |=================== | 28%
     |
     |==================== | 28%
     |
     |==================== | 29%
     |
     |===================== | 29%
     |
     |===================== | 30%
     |
     |===================== | 31%
     |
     |====================== | 31%
     |
     |====================== | 32%
     |
     |======================= | 32%
     |
     |======================= | 33%
     |
     |======================== | 34%
     |
     |======================== | 35%
     |
     |========================= | 35%
     |
     |========================= | 36%
     |
     |========================== | 37%
     |
     |========================== | 38%
     |
     |=========================== | 38%
     |
     |=========================== | 39%
     |
     |============================ | 39%
     |
     |============================ | 40%
     |
     |============================ | 41%
     |
     |============================= | 41%
     |
     |============================= | 42%
     |
     |============================== | 42%
     |
     |============================== | 43%
     |
     |=============================== | 44%
     |
     |=============================== | 45%
     |
     |================================ | 45%
     |
     |================================ | 46%
     |
     |================================= | 47%
     |
     |================================= | 48%
     |
     |================================== | 48%
     |
     |================================== | 49%
     |
     |=================================== | 49%
     |
     |=================================== | 50%
     |
     |=================================== | 51%
     |
     |==================================== | 51%
     |
     |==================================== | 52%
     |
     |===================================== | 52%
     |
     |===================================== | 53%
     |
     |====================================== | 54%
     |
     |====================================== | 55%
     |
     |======================================= | 55%
     |
     |======================================= | 56%
     |
     |======================================== | 57%
     |
     |======================================== | 58%
     |
     |========================================= | 58%
     |
     |========================================= | 59%
     |
     |========================================== | 59%
     |
     |========================================== | 60%
     |
     |========================================== | 61%
     |
     |=========================================== | 61%
     |
     |=========================================== | 62%
     |
     |============================================ | 62%
     |
     |============================================ | 63%
     |
     |============================================= | 64%
     |
     |============================================= | 65%
     |
     |============================================== | 65%
     |
     |============================================== | 66%
     |
     |=============================================== | 67%
     |
     |=============================================== | 68%
     |
     |================================================ | 68%
     |
     |================================================ | 69%
     |
     |================================================= | 69%
     |
     |================================================= | 70%
     |
     |================================================= | 71%
     |
     |================================================== | 71%
     |
     |================================================== | 72%
     |
     |=================================================== | 72%
     |
     |=================================================== | 73%
     |
     |==================================================== | 74%
     |
     |==================================================== | 75%
     |
     |===================================================== | 75%
     |
     |===================================================== | 76%
     |
     |====================================================== | 77%
     |
     |====================================================== | 78%
     |
     |======================================================= | 78%
     |
     |======================================================= | 79%
     |
     |======================================================== | 79%
     |
     |======================================================== | 80%
     |
     |======================================================== | 81%
     |
     |========================================================= | 81%
     |
     |========================================================= | 82%
     |
     |========================================================== | 82%
     |
     |========================================================== | 83%
     |
     |=========================================================== | 84%
     |
     |=========================================================== | 85%
     |
     |============================================================ | 85%
     |
     |============================================================ | 86%
     |
     |============================================================= | 87%
     |
     |============================================================= | 88%
     |
     |============================================================== | 88%
     |
     |============================================================== | 89%
     |
     |=============================================================== | 89%
     |
     |=============================================================== | 90%
     |
     |=============================================================== | 91%
     |
     |================================================================ | 91%
     |
     |================================================================ | 92%
     |
     |================================================================= | 92%
     |
     |================================================================= | 93%
     |
     |================================================================== | 94%
     |
     |================================================================== | 95%
     |
     |=================================================================== | 95%
     |
     |=================================================================== | 96%
     |
     |==================================================================== | 97%
     |
     |==================================================================== | 98%
     |
     |===================================================================== | 98%
     |
     |===================================================================== | 99%
     |
     |======================================================================| 99%
     |
     |======================================================================| 100%
    $res
    $res$par
    [1] -15.81515
    
    $res$objective
    [1] 67.46773
    
    $res$convergence
    [1] 0
    
    $res$iterations
    [1] 5
    
    $res$evaluations
    function gradient
     9 8
    
    $res$message
    [1] "both X-convergence and relative convergence (5)"
    
    
    $iteration_no
    [1] 1 2 3 7 8 15 73 131 466
    
    $startingparams_sequence
    [1] 29.4074334 9.4074334 -30.5925666 -0.5925666 -5.5925666 -15.5925666
    [7] -17.4675666 -15.2800666 -14.8113166
    
    $foundparams_sequence
    [1] 28.303752 10.609181 -29.597542 -1.190591 -4.532845 -16.117845 -15.967215
    [8] -15.661611 -15.815151
    
    $objective_val_sequence
    [1] 84.04052 81.84853 76.56611 76.39410 69.31956 67.52682 67.48679 67.47030
    [9] 67.46773
    
    > points(minfw$res$par, minfw$res$objective, pch = 8, lwd = 2, col = "red", cex = 2)
    >
    > ### Calibrating the Nelson-Siegel-Svensson model (from Gilli, Schumann (2010)) :
    > # Nelson - Siegel - Svensson model
    > NSS2 <- function(betaV, mats)
    + {
    + gam1 <- mats / betaV [5]
    + gam2 <- mats / betaV [6]
    + aux1 <- 1 - exp (- gam1)
    + aux2 <- 1 - exp (- gam2)
    + betaV[1] + betaV[2] * (aux1 / gam1) +
    + betaV[3] * (aux1 / gam1 + aux1 - 1) +
    + betaV[4] * (aux2 / gam2 + aux2 - 1)
    + }
    >
    > betaTRUE <- c(5, -2 ,5, -5 ,1 ,3)
    > mats <- c(1 ,3 ,6 ,9 ,12 ,15 ,18 ,21 ,24 ,30 ,36 ,48 ,60 ,72 ,84 ,
    + 96,108 ,120)/ 12
    > yM <- NSS2 (betaTRUE, mats)
    > dataList <- list ( yM = yM, mats = mats, model = NSS2)
    > plot (mats, yM, xlab = " maturities in years ", ylab =" yields in pct. ")
    >
    > # define objective function
    > OF <- function (betaV, dataList) {
    + mats <- dataList$mats
    + yM <- dataList$yM
    + model <- dataList$model
    + y <- model(betaV, mats)
    + aux <- y - yM
    + crossprod(aux)
    + }
    >
    > settings <- list (min = c( 0, -15, -30, -30 ,0 ,3),
    + max = c (15, 30, 30, 30 ,3 ,6), d = 6)
    > NSStest <- multiStartoptim(objectivefn = OF, data = dataList,
    + lower = settings$min,
    + upper = settings$max,
    + method = "nlminb",
    + nbtrials = 50, typerunif = "torus")
    Error in nbpar != length(upper) || lower > upper :
     'length = 6' in coercion to 'logical(1)'
    Calls: multiStartoptim
    Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64