Running ‘testthat.R’ [17s/18s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bigKRLS)
  Loading required package: bigmemory
  
  
  bigKRLS is authored by Pete Mohanty (Stanford University) and Robert Shaffer (University of Pennsylvania) under License GPL 3.
  
  To get started, check out vignette("bigKRLS_basics").
  
  If you use this package in your research, kindly cite:
  
  
  Pete Mohanty and Robert Shaffer. 2018. 'Messy Data, Robust Inference? Navigating Obstacles to Inference with bigKRLS.' Political Analysis. Cambridge University Press. DOI=10.1017/pan.2018.33. pages 1-18.
  > 
  > # have to disable R_TESTS environment variable or parallel::makePSOCKcluster hangs.
  > Sys.setenv("R_TESTS" = "")
  > 
  > 
  > test_check("bigKRLS")
  ..........................
  All done. You may wish to use summary() for more detail, predict() for out-of-sample forecasts, or shiny.bigKRLS() to interact with results. For an alternative approach, see help(crossvalidate.bigKRLS). Type vignette("bigKRLS_basics") for sample syntax. Use save.bigKRLS() to store results and load.bigKRLS() to re-open them.
  
  
  
  MODEL SUMMARY:
  
  lambda: 0.1306 
  N: 32 
  N Effective: 15.17858 
  R2: 0.9405 
  R2AME**: 0.8477 
  
  Average Marginal Effects:
  
       Estimate Std. Error t value Pr(>|t|)
  cyl   -0.0733     0.0765 -0.9581   0.3806
  disp  -0.0037     0.0022 -1.6485   0.1582
  hp    -0.0145     0.0040 -3.5903   0.0148
  drat   1.2786     0.6303  2.0287   0.0963
  wt    -1.4940     0.3115 -4.7968   0.0045
  qsec   0.3678     0.1741  2.1123   0.0864
  vs*    1.2772     0.6234  2.0488   0.0938
  am*    0.9967     0.5954  1.6739   0.1530
  gear   1.0847     0.2867  3.7828   0.0120
  carb  -0.5951     0.1518 -3.9200   0.0104
  
  
  Percentiles of Marginal Effects:
  
            5%     25%     50%     75%     95%
  cyl  -0.3219 -0.1071 -0.0182  0.0065  0.0406
  disp -0.0108 -0.0080 -0.0040 -0.0011  0.0044
  hp   -0.0372 -0.0258 -0.0138 -0.0009  0.0038
  drat -0.4892  0.6973  1.1559  2.1076  3.4894
  wt   -3.5756 -1.9904 -1.2308 -0.7641 -0.2853
  qsec -0.1250  0.0504  0.2099  0.5900  1.2423
  vs*  -0.3757  0.8754  1.2843  1.8167  2.6408
  am*  -0.6929  0.3432  0.8767  1.8618  2.7406
  gear -0.4504 -0.1866  0.8420  1.9432  3.4149
  carb -1.1902 -1.0159 -0.5844 -0.2336  0.0107
  
  (*) Reported average and percentiles of dy/dx is for discrete change of the dummy variable from min to max (usually 0 to 1)).
  
  
  (**) Pseudo-R^2 computed using only the Average Marginal Effects.
  
  
  You may also wish to use predict() for out-of-sample forecasts or shiny.bigKRLS() to interact with results. Type vignette("bigKRLS_basics") for sample syntax. Use save.bigKRLS() to store results and load.bigKRLS() to re-open them.
  
  Saving model estimates to:
  
   bigKRLS_test_results 
  
  
  0 matrices saved as big matrices (base R save() may be used safely in this case too).
  Smaller, base R elements of the outputted object saved: bigKRLS_test_results/estimates.RData 
  
  Total file size approximately 0 megabytes.
  .
  model estimates will be saved to:
  
   bigKRLS_test_bigmemory_results 
  
  ................
  saving vcovmatyhat to /home/hornik/tmp/R.check/r-release-gcc/Work/PKGS/bigKRLS.Rcheck/tests/testthat
  vcovmatyhat successfully saved to disk (and removed from memory for speed).
  ..........
  saving output to bigKRLS_test_bigmemory_results 
  	writing bigKRLS_test_bigmemory_results/X.txt ...
  	writing bigKRLS_test_bigmemory_results/K.txt ...
  	writing bigKRLS_test_bigmemory_results/vcov.est.c.txt ...
  	writing bigKRLS_test_bigmemory_results/derivatives.txt ...
  
  
   5 matrices saved as big matrices.
  
  to reload, use syntax like:
  
  load.bigKRLS("/home/hornik/tmp/R.check/r-release-gcc/Work/PKGS/bigKRLS.Rcheck/tests/testthat/bigKRLS_test_bigmemory_results")
   or
  load.bigKRLS("/home/hornik/tmp/R.check/r-release-gcc/Work/PKGS/bigKRLS.Rcheck/tests/testthat/bigKRLS_test_bigmemory_results", newname="my_estimates")
  
  base R elements of the output saved to estimates.RData.
  Total file size approximately 0 megabytes.
  
  
  All done. You may wish to use summary() for more detail, predict() for out-of-sample forecasts, or shiny.bigKRLS() to interact with results. For an alternative approach, see help(crossvalidate.bigKRLS). Type vignette("bigKRLS_basics") for sample syntax. Use save.bigKRLS() to store results and load.bigKRLS() to re-open them.
  
  	Reading from K.txt 
  	Reading from X.txt 
  	Reading from derivatives.txt 
  	Reading from vcov.est.c.txt 
  NOTE: vcov.est.fitted not found in .RData or in big matrix file, vcov.est.fitted.txt .
  
  .......................
  Overview of Model Performance
  
  N: 32 
  Seed: 123 
  
                                                     In Sample Out of Sample
  Mean Squared Error (Full Model)                        2.600        19.321
  Mean Squared Error (Average Marginal Effects Only)   495.668       424.241
  Pseudo-R^2 (Full Model)                                0.923         0.748
  Pseudo-R^2 (Average Marginal Effects Only)             0.883         0.869
                                                                            
  N                                                     26.000         6.000
  
  
  Summary of Training Model:
  
  
  MODEL SUMMARY:
  
  lambda: 0.3256 
  N: 26 
  N Effective: 14.64697 
  R2: 0.9233 
  R2AME**: 0.8825 
  
  Average Marginal Effects:
  
       Estimate Std. Error t value Pr(>|t|)
  cyl   -0.2834     0.0540 -5.2470   0.0041
  disp  -0.0025     0.0017 -1.4489   0.2113
  hp    -0.0041     0.0022 -1.8527   0.1275
  drat   0.4507     0.4306  1.0469   0.3465
  wt    -0.9008     0.1954 -4.6091   0.0069
  qsec   0.1009     0.1093  0.9234   0.4012
  vs*    1.5226     0.5161  2.9504   0.0349
  am*    1.8300     0.4388  4.1708   0.0102
  gear   0.2460     0.1705  1.4428   0.2129
  carb  -0.5615     0.1068 -5.2579   0.0041
  
  
  Percentiles of Marginal Effects:
  
            5%     25%     50%     75%    95%
  cyl  -0.8337 -0.4770 -0.2024 -0.0492 0.0146
  disp -0.0079 -0.0048 -0.0020 -0.0002 0.0021
  hp   -0.0128 -0.0076 -0.0038 -0.0009 0.0041
  drat -0.5933 -0.0721  0.4427  0.8132 1.7605
  wt   -1.5554 -1.1997 -1.0480 -0.6164 0.0887
  qsec -0.1604 -0.0381  0.0497  0.1862 0.5854
  vs*   0.6401  0.9689  1.2350  1.8045 3.3140
  am*   0.1055  1.0861  1.6417  2.6389 3.7621
  gear -0.6591 -0.2988  0.3466  0.6775 1.1858
  carb -0.9832 -0.8020 -0.5780 -0.4188 0.0251
  
  (*) Reported average and percentiles of dy/dx is for discrete change of the dummy variable from min to max (usually 0 to 1)).
  
  
  (**) Pseudo-R^2 computed using only the Average Marginal Effects.
  
  
  You may also wish to use predict() for out-of-sample forecasts or shiny.bigKRLS() to interact with results. Type vignette("bigKRLS_basics") for sample syntax. Use save.bigKRLS() to store results and load.bigKRLS() to re-open them.
  
  ...................................
  ...................
  .....................
  .....................
  ..................
  ...............
  .................
  .................
  ......................── 1. Error: (unknown) (@test_basic_usage.R#143)  ──────────────────────────────
  Problem creating filebacked matrix.
  1: crossvalidate.bigKRLS(y, as.big.matrix(X), Kfolds = 4, seed = 1234, Neig = 0.75 * 
         nrow(X), Ncores = 1) at testthat/test_basic_usage.R:143
  2: to.big.matrix(matrix(trained$avgderivatives), p = 1, path = big.meta)
  3: as.big.matrix(matrix(as.numeric(object), ncol = p), backingfile = name, backingpath = path, 
         descriptorfile = paste0(name, ".desc"))
  4: as.big.matrix(matrix(as.numeric(object), ncol = p), backingfile = name, backingpath = path, 
         descriptorfile = paste0(name, ".desc"))
  5: big.matrix(nrow = nrow(x), ncol = ncol(x), type = type, init = NULL, dimnames = dimnames(x), 
         separated = separated, backingfile = backingfile, backingpath = backingpath, 
         descriptorfile = descriptorfile, binarydescriptor = binarydescriptor, shared = shared)
  6: filebacked.big.matrix(nrow = nrow, ncol = ncol, type = type, init = init, dimnames = dimnames, 
         separated = separated, backingfile = backingfile, backingpath = backingpath, 
         descriptorfile = descriptorfile, binarydescriptor = binarydescriptor)
  7: CreateFileBackedBigMatrix(as.character(backingfile), as.character(backingpath), as.double(nrow), 
         as.double(ncol), as.character(colnames), as.character(rownames), as.integer(typeVal), 
         as.double(init), as.logical(separated))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 15 SKIPPED: 0 FAILED: 1
  1. Error: (unknown) (@test_basic_usage.R#143) 
  
  Error: testthat unit tests failed
  Execution halted