Running 'test-continuous.R' [149s]
  Running 'test-count.R' [174s]
  Running 'test-mandatory.R' [13s]
  Comparing 'test-mandatory.Rout' to 'test-mandatory.Rout.save' ... OK
  Running 'test-ordinal.R' [159s]
  Running 'test-shiftscale.R' [5s]
  Comparing 'test-shiftscale.Rout' to 'test-shiftscale.Rout.save' ... OK
  Running 'test-survival.R' [208s]
  Running 'test-weibull.R' [169s]
Running the tests in 'tests/test-continuous.R' failed.
Complete output:
  > # Demo continuous / sparse
  > 
  > # Windows diffs...
  > old <- options(digits = 3)
  > 
  > set.seed(24101968)
  > library("tramvs")
  Loading required package: tram
  Loading required package: mlt
  Loading required package: basefun
  Loading required package: variables
  Loading required package: mvtnorm
  > 
  > N <- 1e2
  > P <- 5
  > nz <- 3
  > beta <- rep(c(3, 0), c(nz, P - nz))
  > X <- matrix(rnorm(N * P), nrow = N, ncol = P)
  > Y <- 1 + X %*% beta + rnorm(N)
  > 
  > dat <- data.frame(y = Y, x = X)
  > res <- tramvs(y ~ ., data = dat, modFUN = Lm)
  > as(as.matrix(coef(res, as.lm = TRUE)), "sparseMatrix")
  6 x 5 sparse Matrix of class "dgCMatrix"
                  1     2     3      4      5
  (Intercept) 0.439 0.527 0.919 0.9225 0.9240
  x.1         .     3.041 3.040 3.0353 3.0330
  x.2         .     .     2.924 2.9196 2.9164
  x.3         3.141 2.822 2.981 2.9800 2.9831
  x.4         .     .     .     0.0306 0.0322
  x.5         .     .     .     .      0.0228
  > 
  > # S3 methods
  > print(res)
  
  L0-penalized tram:
  
    Normal Linear Regression Model 
  
  Call:
  modFUN(formula = formula, data = data, fixed = fix0, theta = theta_init[!names(theta_init) %in% 
      I0])
  
  Coefficients:
   x.1  x.2  x.3  x.4  x.5 
  3.27 3.14 3.20 0.00 0.00 
  
  Log-Likelihood:
   -135 (df = 5)
  
  
  SIC:
   142 
  
  Active set: x.1 x.2 x.3 
  
  > summary(res)
  
  L0-penalized tram:
  
    Normal Linear Regression Model 
  
  Call:
  modFUN(formula = formula, data = data, fixed = fix0, theta = theta_init[!names(theta_init) %in% 
      I0])
  
  Coefficients:
   x.1  x.2  x.3  x.4  x.5 
  3.27 3.14 3.20 0.00 0.00 
  
  Log-Likelihood:
   -135 (df = 5)
  
  
  SIC:
    supp SIC
  1    1 289
  2    2 259
  3    3 142
  4    4 145
  5    5 147
  
  
  Active set: x.1 x.2 x.3 
  
  > plot(res, type = "b")
  > plot(res, which = "path")
  > logLik(res)
  'log Lik.' -135 (df=5)
  > SIC(res)
    supp SIC
  1    1 289
  2    2 259
  3    3 142
  4    4 145
  5    5 147
  > coef(res)
  5 x 5 sparse Matrix of class "dgCMatrix"
          1     2    3      4      5
  x.1 .     0.992 3.27 3.2617 3.2599
  x.2 .     .     3.14 3.1373 3.1346
  x.3 0.742 0.921 3.20 3.2022 3.2063
  x.4 .     .     .    0.0329 0.0347
  x.5 .     .     .    .      0.0246
  > predict(res, which = "distribution", type = "trafo")
          1         2         3         4         5         6         7         8 
   1.057633  0.938891 -0.319441  0.267900 -0.346435  0.305419  1.038316  1.092203 
          9        10        11        12        13        14        15        16 
   0.367631 -0.096266  0.242010 -0.158164 -0.272543  0.433334 -0.000871  0.139438 
         17        18        19        20        21        22        23        24 
   0.900727 -0.883584 -0.556964 -0.014501  0.644163  1.325734 -1.695937  0.808211 
         25        26        27        28        29        30        31        32 
   1.340993 -2.754900 -0.879698  0.100767  1.493486 -1.118307 -0.084378  1.028970 
         33        34        35        36        37        38        39        40 
  -0.185955  0.163202  0.706742  0.708127  0.149231  0.676972  0.684430 -0.191703 
         41        42        43        44        45        46        47        48 
  -1.621863  0.220729 -1.870112 -0.950670  1.745899 -0.454247  0.418951 -1.694427 
         49        50        51        52        53        54        55        56 
   2.082652 -2.560474 -0.852221  0.581553 -0.458595 -0.505321  0.579340 -0.498464 
         57        58        59        60        61        62        63        64 
  -0.489818 -0.433747  0.158522 -2.085218 -1.535741 -0.646516  0.305717  1.185051 
         65        66        67        68        69        70        71        72 
   0.553139  1.249757  1.316974  1.034674 -0.907391  1.936795  0.296856 -0.543625 
         73        74        75        76        77        78        79        80 
  -0.217666 -0.003841 -0.727780  0.825163  0.325041 -1.204106  0.794184  0.779258 
         81        82        83        84        85        86        87        88 
   0.638912  1.231491  0.409729  1.476144 -0.930699 -0.173911 -0.473310 -1.685313 
         89        90        91        92        93        94        95        96 
   0.689835 -1.148677 -0.085008 -1.292723  1.997815 -0.435108 -0.948815 -0.942772 
         97        98        99       100 
  -0.116455 -1.298188 -1.037059  0.937855 
  > residuals(res)
    [1]  1.057633  0.938891 -0.319441  0.267900 -0.346435  0.305419  1.038316
    [8]  1.092203  0.367631 -0.096266  0.242010 -0.158164 -0.272543  0.433334
   [15] -0.000871  0.139438  0.900727 -0.883584 -0.556964 -0.014501  0.644163
   [22]  1.325734 -1.695937  0.808211  1.340993 -2.754900 -0.879698  0.100767
   [29]  1.493486 -1.118307 -0.084378  1.028970 -0.185955  0.163202  0.706742
   [36]  0.708127  0.149231  0.676972  0.684430 -0.191703 -1.621863  0.220729
   [43] -1.870112 -0.950670  1.745899 -0.454247  0.418951 -1.694427  2.082652
   [50] -2.560474 -0.852221  0.581553 -0.458595 -0.505321  0.579340 -0.498464
   [57] -0.489818 -0.433747  0.158522 -2.085218 -1.535741 -0.646516  0.305717
   [64]  1.185051  0.553139  1.249757  1.316974  1.034674 -0.907391  1.936795
   [71]  0.296856 -0.543625 -0.217666 -0.003841 -0.727780  0.825163  0.325041
   [78] -1.204106  0.794184  0.779258  0.638912  1.231491  0.409729  1.476144
   [85] -0.930699 -0.173911 -0.473310 -1.685313  0.689835 -1.148677 -0.085008
   [92] -1.292723  1.997815 -0.435108 -0.948815 -0.942772 -0.116455 -1.298188
   [99] -1.037059  0.937855
  > 
  > # Active set
  > support(res)
  [1] "x.1" "x.2" "x.3"
  > 
  > options(old)
  > 
  > # Compare with abess ------------------------------------------------------
  > 
  > if (require("abess")) {
  +   res_abess <- abess(y ~ ., data = dat, family = "gaussian")
  +   coef(res_abess)[,-1]
  + }
  Loading required package: abess
  
   Thank you for using abess! To acknowledge our work, please cite the package:
  
   Zhu J, Wang X, Hu L, Huang J, Jiang K, Zhang Y, Lin S, Zhu J (2022). 'abess: A Fast Best Subset Selection Library in Python and R.' Journal of Machine Learning Research, 23(202), 1-7. https://www.jmlr.org/papers/v23/21-1060.html.
  6 x 5 sparse Matrix of class "dgCMatrix"
                     1         2         3         4          5
  (intercept) 0.439040 0.8308808 0.9189552 0.9225058 0.92397884
  x.1         .        .         3.0402578 3.0353418 3.03297330
  x.2         .        2.9253025 2.9241734 2.9195786 2.91639753
  x.3         3.141053 3.2995905 2.9806405 2.9800220 2.98312989
  x.4         .        .         .         0.0306444 0.03223896
  x.5         .        .         .         .         0.02284576
  > 
  > proc.time()
     user  system elapsed 
     3.39    0.32    3.71 
Running the tests in 'tests/test-count.R' failed.
Complete output:
  > # Demo count / sparse
  > 
  > # Windows diffs...
  > old <- options(digits = 3)
  > 
  > set.seed(24101968)
  > suppressMessages(library(tramvs))
  > 
  > N <- 1e2
  > P <- 5
  > nz <- 3
  > beta <- rep(c(1, 0), c(nz, P - nz))
  > X <- matrix(abs(rnorm(N * P)), nrow = N, ncol = P)
  > Y <- as.integer(1 + X %*% beta + abs(rnorm(N)))
  > 
  > dat <- data.frame(y = Y, x = X)
  > res <- cotramVS(y ~ ., data = dat)
  > 
  > # Active set
  > support(res)
  [1] "x.1" "x.2" "x.3"
  > 
  > options(old)
  > 
  > proc.time()
     user  system elapsed 
    11.06    1.39   12.43 
Running the tests in 'tests/test-ordinal.R' failed.
Complete output:
  > # Demo ordinal
  > 
  > # Windows diffs...
  > old <- options(digits = 3)
  > 
  > set.seed(24101968)
  > library("tramvs")
  Loading required package: tram
  Loading required package: mlt
  Loading required package: basefun
  Loading required package: variables
  Loading required package: mvtnorm
  > 
  > if (require("ordinal")) {
  +   data("wine", package = "ordinal")
  +   wine$noise <- rnorm(nrow(wine))
  + 
  +   # Estimate support size via HBIC
  +   res <- tramvs(rating ~ temp + contact + noise, data = wine, modFUN = Polr)
  +   plot(res, type = "b")
  +   plot(res, which = "path")
  + 
  +   coef(res)
  +   coef(res, with_baseline = TRUE)
  + 
  +   # Active set
  +   support(res)
  + 
  +   options(old)
  + }
  Loading required package: ordinal
  > 
  > proc.time()
     user  system elapsed 
     2.95    0.31    3.26 
Running the tests in 'tests/test-survival.R' failed.
Complete output:
  > # Demo survival
  > 
  > # Windows diffs...
  > old <- options(digits = 3)
  > 
  > set.seed(24101968)
  > library("tramvs")
  Loading required package: tram
  Loading required package: mlt
  Loading required package: basefun
  Loading required package: variables
  Loading required package: mvtnorm
  > 
  > if (require("TH.data") & require("abess") & require("survival")) {
  +   data("GBSG2", package = "TH.data")
  + 
  +   res <- tramvs(Surv(time, cens) ~ . - time - cens, data = GBSG2, modFUN = Coxph)
  +   res_abess <- abess(model.matrix(~ . - time - cens, data = GBSG2)[, -1],
  +                      y = with(GBSG2, Surv(time, cens)),
  +                      data = GBSG2, family = "cox")
  + 
  +   # M1 diffs
  +   round(coef(res), 2)
  +   round(coef(res_abess)[,-1], 2)
  + 
  +   # Active set
  +   support(res)
  + }
  Loading required package: TH.data
  Loading required package: survival
  Loading required package: MASS
  
  Attaching package: 'TH.data'
  
  The following object is masked from 'package:MASS':
  
      geyser
  
  Loading required package: abess
  
   Thank you for using abess! To acknowledge our work, please cite the package:
  
   Zhu J, Wang X, Hu L, Huang J, Jiang K, Zhang Y, Lin S, Zhu J (2022). 'abess: A Fast Best Subset Selection Library in Python and R.' Journal of Machine Learning Research, 23(202), 1-7. https://www.jmlr.org/papers/v23/21-1060.html.
  [1] "tgrade.L" "pnodes"   "progrec" 
  There were 50 or more warnings (use warnings() to see the first 50)
  > 
  > options(old)
  > 
  > proc.time()
     user  system elapsed 
    51.09    4.28   55.42 
Running the tests in 'tests/test-weibull.R' failed.
Complete output:
  > # Demo Weibull
  > 
  > # Windows diffs...
  > old <- options(digits = 3)
  > 
  > set.seed(24101968)
  > library("tramvs")
  Loading required package: tram
  Loading required package: mlt
  Loading required package: basefun
  Loading required package: variables
  Loading required package: mvtnorm
  > 
  > if (require("TH.data") & require("survival")) {
  +   data("GBSG2", package = "TH.data")
  + 
  +   ## using the alias SurvregVS
  +   GBSG2$surv <- with(GBSG2, Surv(time, cens))
  +   res <- SurvregVS(surv ~ horTh + age + menostat + tsize + tgrade +
  +                      pnodes + progrec + estrec, data = GBSG2)
  + 
  +   coef(res)
  + 
  +   # Active set
  +   support(res)
  + }
  Loading required package: TH.data
  Loading required package: survival
  Loading required package: MASS
  
  Attaching package: 'TH.data'
  
  The following object is masked from 'package:MASS':
  
      geyser
  
  [1] "tgrade.L" "pnodes"   "progrec" 
  > 
  > options(old)
  > 
  > proc.time()
     user  system elapsed 
    15.64    0.75   16.34