R Under development (unstable) (2025-08-26 r88710 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(ptLasso) Loading required package: ggplot2 Loading required package: glmnet Loading required package: Matrix Loaded glmnet 4.1-10 Loading required package: gridExtra > > test_check("ptLasso") Call: cv.ptLasso(x = x, y = y, groups = groups, family = "cox", type.measure = "C", nfolds = 3, foldid = NULL, overall.lambda = "lambda.min", use.case = "inputGroups", group.intercepts = TRUE) type.measure: C alpha overall mean wtdMean group_1 group_2 Overall 0.5237 0.5124 0.5091 0.4961 0.5286 Pretrain 0.0 0.5000 0.5152 0.5212 0.5451 0.4854 Pretrain 0.1 0.4496 0.5374 0.5340 0.5204 0.5544 Pretrain 0.2 0.4331 0.4581 0.4629 0.4820 0.4342 Pretrain 0.3 0.4590 0.4487 0.4441 0.4255 0.4720 Pretrain 0.4 0.4496 0.4613 0.4682 0.4957 0.4268 Pretrain 0.5 0.6132 0.6520 0.6440 0.6120 0.6919 Pretrain 0.6 0.4226 0.4732 0.4756 0.4852 0.4611 Pretrain 0.7 0.4989 0.4898 0.4915 0.4979 0.4818 Pretrain 0.8 0.5079 0.5303 0.5404 0.5808 0.4799 Pretrain 0.9 0.5523 0.5692 0.5727 0.5864 0.5521 Pretrain 1.0 0.5361 0.5494 0.5589 0.5968 0.5020 Individual 0.5361 0.5494 0.5589 0.5968 0.5020 alphahat (fixed) = 0.5 alphahat (varying): group_1 group_2 0.5 0.5 Call: cv.ptLassoMult(x = x, y = y, alphalist = alphalist, type.measure = "mae", nfolds = nfolds, foldid = foldid, verbose = verbose, fitoverall = fitoverall, fitind = fitind, s = s, gamma = gamma, call = this.call, use.case = "multiresponse", group.intercepts = FALSE) type.measure: mae alpha overall mean response_1 response_2 Overall 3.521 1.760 1.774 1.746 Pretrain 0.0 3.616 1.808 1.852 1.764 Pretrain 0.1 3.609 1.805 1.857 1.753 Pretrain 0.2 3.606 1.803 1.857 1.749 Pretrain 0.3 3.589 1.794 1.843 1.746 Pretrain 0.4 3.575 1.788 1.832 1.743 Pretrain 0.5 3.566 1.783 1.826 1.740 Pretrain 0.6 3.555 1.778 1.818 1.737 Pretrain 0.7 3.541 1.770 1.808 1.733 Pretrain 0.8 3.527 1.764 1.797 1.730 Pretrain 0.9 3.519 1.759 1.786 1.733 Pretrain 1.0 3.516 1.758 1.779 1.737 Individual 3.516 1.758 1.779 1.737 alphahat (fixed) = 1 alphahat (varying): response_1 response_2 1.0 0.8 Call: cv.ptLasso(x = x, y = y, groups = groups, family = "multinomial", use.case = "targetGroups", type.measure = "class", nfolds = 3, foldid = NULL, overall.lambda = "lambda.min", group.intercepts = TRUE) type.measure: class alpha overall mean group_1 group_2 group_3 Overall 0.2700 Pretrain 0.0 0.2800 0.1844 0.1933 0.2100 0.1500 Pretrain 0.1 0.2833 0.1900 0.2067 0.1900 0.1733 Pretrain 0.2 0.2833 0.1789 0.1800 0.2033 0.1533 Pretrain 0.3 0.2733 0.1833 0.1967 0.2067 0.1467 Pretrain 0.4 0.2967 0.1956 0.2000 0.2233 0.1633 Pretrain 0.5 0.2933 0.1878 0.1933 0.2200 0.1500 Pretrain 0.6 0.2567 0.1800 0.1800 0.2033 0.1567 Pretrain 0.7 0.2867 0.1944 0.1933 0.2400 0.1500 Pretrain 0.8 0.2667 0.1867 0.1767 0.2267 0.1567 Pretrain 0.9 0.2767 0.1922 0.2033 0.2133 0.1600 Pretrain 1.0 0.2867 0.1889 0.1933 0.2133 0.1600 Individual 0.2867 0.1889 0.1933 0.2133 0.1600 alphahat (fixed) = 0.6 alphahat (varying): group_1 group_2 group_3 0.8 0.1 0.3 [ FAIL 0 | WARN 2 | SKIP 0 | PASS 121 ] [ FAIL 0 | WARN 2 | SKIP 0 | PASS 121 ] > > proc.time() user system elapsed 146.04 2.17 148.15