Running 'testthat.R' [35s]
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 d:/Rcompile/CRANpkg/local/3.6/bigKRLS.Rcheck/tests_x64/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("d:\RCompile\CRANpkg\local\3.6\bigKRLS.Rcheck\tests_x64\testthat\bigKRLS_test_bigmemory_results")
   or
  load.bigKRLS("d:\RCompile\CRANpkg\local\3.6\bigKRLS.Rcheck\tests_x64\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)                        1.125         7.532
  Mean Squared Error (Average Marginal Effects Only)   282.697       302.770
  Pseudo-R^2 (Full Model)                                0.971         0.919
  Pseudo-R^2 (Average Marginal Effects Only)             0.860         0.866
                                                                            
  N                                                     26.000         6.000
  
  
  Summary of Training Model:
  
  
  MODEL SUMMARY:
  
  lambda: 0.0749 
  N: 26 
  N Effective: 8.693671 
  R2: 0.9713 
  R2AME**: 0.8595 
  
  Average Marginal Effects:
  
       Estimate Std. Error t value Pr(>|t|)
  cyl   -0.0308     0.0738 -0.4177      NaN
  disp  -0.0013     0.0019 -0.6889      NaN
  hp    -0.0214     0.0036 -5.9445      NaN
  drat   0.7105     0.5552  1.2797      NaN
  wt    -2.1883     0.2698 -8.1106      NaN
  qsec   0.4290     0.1427  3.0069      NaN
  vs*    1.6259     0.5522  2.9445      NaN
  am*    0.8126     0.5254  1.5466      NaN
  gear   1.2481     0.2464  5.0661      NaN
  carb  -0.6583     0.1271 -5.1802      NaN
  
  
  Percentiles of Marginal Effects:
  
            5%     25%     50%     75%     95%
  cyl  -0.2678 -0.0583 -0.0249  0.0639  0.1224
  disp -0.0157 -0.0097 -0.0034  0.0065  0.0148
  hp   -0.0532 -0.0355 -0.0238 -0.0039  0.0019
  drat -0.8121  0.1667  0.6667  1.2357  3.1801
  wt   -4.8466 -2.6870 -1.8917 -1.4949 -0.6539
  qsec -0.1957  0.1062  0.3431  0.7820  1.2412
  vs*   0.1074  1.0071  1.6507  2.2429  3.3543
  am*  -0.8303 -0.0115  0.7399  1.5441  3.1487
  gear -0.4625 -0.0895  1.0600  2.1423  3.4811
  carb -1.4582 -1.2111 -0.5200 -0.2011 -0.0732
  
  (*) 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. Failure: crossvalidation function works (@test_basic_usage.R#133)  -------
  cv$pseudoR2_oos not equal to cv_noderivs$pseudoR2_oos.
  1/1 mismatches
  [1] 0.919 - 0.85 == 0.0688
  
  ....................
  .....................
  ....................
  ....................
  ................
  .................
  ................
  ................
  ....................
  .....................
  ....................
  ....................
  Overview of Model Performance
  
  N: 250 
  Kfolds: 4 
  Seed: 1234 
  
                          Fold 1 Fold 2 Fold 3 Fold 4
  MSE (In Sample)          0.734  0.743  0.695  0.686
  MSE (Out of Sample)      1.276  0.873  1.195  1.226
  MSE AME (In Sample)      2.695  1.984  2.540  2.209
  MSE AME (Out of Sample)  3.177  1.677  3.045  1.936
  R2 (In Sample)           0.774  0.791  0.787  0.787
  R2 (Out of Sample)       0.648  0.681  0.667  0.659
  R2 AME (In Sample)       0.742  0.731  0.732  0.750
  R2 AME (Out of Sample)   0.708  0.769  0.734  0.682
  
  MSE denotes Mean Squared Error. AME implies calculations done with Average Marginal Effects only.
  
  Summary of Training Model1:
  
  
  MODEL SUMMARY:
  
  lambda: 0.899 
  N: 187 
  N Effective: 156.3024 
  R2: 0.7736 
  R2AME**: 0.7417 
  
  Average Marginal Effects:
  
     Estimate Std. Error t value Pr(>|t|)
  x1   0.9589     0.1905  5.0346        0
  x2   1.4519     0.1891  7.6767        0
  x3   2.0993     0.1798 11.6737        0
  x4   2.7440     0.1757 15.6168        0
  
  
  Percentiles of Marginal Effects:
  
          5%     25%    50%    75%    95%
  x1 -1.6189 -0.0087 1.0668 1.8372 3.3296
  x2 -1.0785  0.6842 1.7075 2.3498 3.0562
  x3 -0.3417  1.2507 2.1789 3.1527 4.4687
  x4  0.7443  1.9765 2.8437 3.5838 4.4058
  
  (**) 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.
  
  
  
  Summary of Training Model2:
  
  
  MODEL SUMMARY:
  
  lambda: 0.5778 
  N: 188 
  N Effective: 151.2168 
  R2: 0.7908 
  R2AME**: 0.7309 
  
  Average Marginal Effects:
  
     Estimate Std. Error t value Pr(>|t|)
  x1   0.8270     0.2062  4.0110    1e-04
  x2   1.5459     0.2060  7.5055    0e+00
  x3   2.4301     0.2042 11.9033    0e+00
  x4   3.1351     0.2036 15.3949    0e+00
  
  
  Percentiles of Marginal Effects:
  
          5%     25%    50%    75%    95%
  x1 -1.6407 -0.2399 0.9918 1.9215 3.0752
  x2 -0.4728  0.7705 1.4049 2.2533 3.8459
  x3  0.0212  1.5036 2.6631 3.3750 4.4612
  x4  0.4207  2.1119 3.3870 4.2646 5.2462
  
  (**) 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.
  
  
  
  Summary of Training Model3:
  
  
  MODEL SUMMARY:
  
  lambda: 0.6276 
  N: 188 
  N Effective: 152.5316 
  R2: 0.787 
  R2AME**: 0.7324 
  
  Average Marginal Effects:
  
     Estimate Std. Error t value Pr(>|t|)
  x1   0.5377     0.2009  2.6770   0.0083
  x2   1.4111     0.2024  6.9715   0.0000
  x3   2.3743     0.1888 12.5778   0.0000
  x4   2.9933     0.1911 15.6618   0.0000
  
  
  Percentiles of Marginal Effects:
  
          5%     25%    50%    75%    95%
  x1 -1.8595 -0.2222 0.6688 1.4931 2.4555
  x2 -0.8720  0.5198 1.2902 2.5101 3.4258
  x3  0.0256  1.2932 2.2869 3.3879 4.8906
  x4  0.0714  2.1910 3.0890 4.0984 5.1052
  
  (**) 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.
  
  
  
  Summary of Training Model4:
  
  
  MODEL SUMMARY:
  
  lambda: 0.6245 
  N: 187 
  N Effective: 151.8663 
  R2: 0.7868 
  R2AME**: 0.7503 
  
  Average Marginal Effects:
  
     Estimate Std. Error t value Pr(>|t|)
  x1   0.8540     0.1975  4.3235        0
  x2   1.6994     0.1972  8.6181        0
  x3   2.1450     0.1909 11.2334        0
  x4   3.0553     0.1950 15.6664        0
  
  
  Percentiles of Marginal Effects:
  
          5%    25%    50%    75%    95%
  x1 -1.1126 0.2378 0.9325 1.5662 3.0208
  x2 -0.2084 1.0239 1.7979 2.5718 3.3397
  x3 -0.1887 1.3657 2.3700 2.9835 3.8805
  x4  0.6929 2.1339 3.1462 4.0975 5.0257
  
  (**) 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.
  
  == testthat results  ===========================================================
  OK: 22 SKIPPED: 0 FAILED: 1
  1. Failure: crossvalidation function works (@test_basic_usage.R#133) 
  
  Error: testthat unit tests failed
  Execution halted