Running ‘testthat.R’ [164s/263s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(personalized)
  Loading required package: glmnet
  Loading required package: Matrix
  Loading required package: foreach
  Loaded glmnet 2.0-16
  
  Loading required package: mgcv
  Loading required package: nlme
  This is mgcv 1.8-28. For overview type 'help("mgcv-package")'.
  Loading required package: gbm
  Loaded gbm 2.1.5
  Loading required package: ggplot2
  Loading required package: plotly
  
  Attaching package: 'plotly'
  
  The following object is masked from 'package:ggplot2':
  
      last_plot
  
  The following object is masked from 'package:stats':
  
      filter
  
  The following object is masked from 'package:graphics':
  
      layout
  
  > 
  > test_check("personalized")
  family:    gaussian 
  loss:      sq_loss_lasso 
  method:    weighting 
  cutpoint:  0 
  propensity 
  function:  propensity.func 
  
  benefit score: f(x), 
  Trt recom = 1*I(f(x)>c)+0*I(f(x)<=c) where c is 'cutpoint'
  
  Average Outcomes:
               Recommended 0    Recommended 1
  Received 0 8.9342 (n = 24) -9.2993 (n = 17)
  Received 1 -5.888 (n = 29)  7.2975 (n = 30)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=0,Recom=0]-E[Y|T=/=0,Recom=0] 
                            14.8221 (n = 53) 
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                            16.5969 (n = 47) 
  
  NOTE: The above average outcomes are biased estimates of
        the expected outcomes conditional on subgroups. 
        Use 'validate.subgroup()' to obtain unbiased estimates.
  
  ---------------------------------------------------
  
  Benefit score quantiles (f(X) for 1 vs 0): 
        0%      25%      50%      75%     100% 
  -21.2999  -6.0495  -0.6492   5.9670  24.5129 
  
  ---------------------------------------------------
  
  Summary of individual treatment effects: 
  E[Y|T=1, X] - E[Y|T=0, X]
  
       Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
  -42.59976 -12.09896  -1.29833   0.03464  11.93393  49.02584 
  family:    gaussian 
  loss:      sq_loss_lasso 
  method:    weighting 
  cutpoint:  0 
  propensity 
  function:  propensity.func 
  
  benefit score: f(x), 
  Trt recom = 1*I(f(x)<c)+0*I(f(x)>=c) where c is 'cutpoint'
  
  Average Outcomes:
                Recommended 0    Recommended 1
  Received 0 -9.1702 (n = 17)  8.2552 (n = 24)
  Received 1  6.9478 (n = 33) -6.3978 (n = 26)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=0,Recom=0]-E[Y|T=/=0,Recom=0] 
                            -16.118 (n = 50) 
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                           -14.6529 (n = 50) 
  
  NOTE: The above average outcomes are biased estimates of
        the expected outcomes conditional on subgroups. 
        Use 'validate.subgroup()' to obtain unbiased estimates.
  
  ---------------------------------------------------
  
  Benefit score quantiles (f(X) for 1 vs 0): 
       0%     25%     50%     75%    100% 
  -19.402  -5.445  -0.225   5.729  22.655 
  
  ---------------------------------------------------
  
  Summary of individual treatment effects: 
  E[Y|T=1, X] - E[Y|T=0, X]
  
      Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
  -38.8032 -10.8899  -0.4501   0.2224  11.4587  45.3103 
  ── 1. Error: test plotting for continuous outcomes with various options (@test-p
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: plot(subgrp.val, type = "stability") at testthat/test-plotandplotcompare.R:152
  2: plot(subgrp.val, type = "stability")
  3: plot.subgroup_validated(subgrp.val, type = "stability")
  4: subplot(ggplotly(p.primary, tooltip = paste0("tooltip", 1:4)), ggplotly(p.secondary, 
         tooltip = paste0("tooltip", 1:2)), nrows = 2, shareX = TRUE, titleX = TRUE, titleY = TRUE) %>% 
         layout(title = "Variable Selection Across Bootstrap Iterations", showlegend = FALSE, 
             xaxis = list(title = "Plot Index"), yaxis = list(title = "Coefficient Value"), 
             yaxis2 = list(title = "Percent of Times Selected"))
  5: eval(lhs, parent, parent)
  6: eval(lhs, parent, parent)
  7: subplot(ggplotly(p.primary, tooltip = paste0("tooltip", 1:4)), ggplotly(p.secondary, 
         tooltip = paste0("tooltip", 1:2)), nrows = 2, shareX = TRUE, titleX = TRUE, titleY = TRUE)
  8: dots2plots(...)
  9: ggplotly(p.primary, tooltip = paste0("tooltip", 1:4))
  10: ggplotly.ggplot(p.primary, tooltip = paste0("tooltip", 1:4))
  11: gg2list(p, width = width, height = height, tooltip = tooltip, dynamicTicks = dynamicTicks, 
         layerData = layerData, originalData = originalData, source = source, ...)
  12: unitConvert(theme$plot.margin, "pixels")
  13: grid::convertHeight(u, "npc")
  14: convertUnit(x, unitTo, "y", "dimension", "y", "dimension", valueOnly = valueOnly)
  15: grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), valid.units(unitTo))
  
  Summary of individual treatment effects: 
  E[Y|T=1, X] - E[Y|T=0, X]
  
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  -52.139 -12.845  -1.892  -1.275   9.642  45.652 
  Summary of individual treatment effects: 
  E[Y|T=1, X] - E[Y|T=0, X]
  
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  -31.664  -5.282   1.790   2.256   9.730  34.133 
  Summary of individual treatment effects: 
  E[Y|T=1, X] - E[Y|T=0, X]
  
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  -31.664  -5.282   1.790   2.256   9.730  34.133 
  Summary of individual treatment effects: 
  E[Y|T=1, X] / E[Y|T=0, X]
  
  Note: for survival outcomes, the above ratio is 
  E[g(Y)|T=1, X] / E[g(Y)|T=0, X], 
  where g() is a monotone increasing function of Y, 
  the survival time
  
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.2158  0.7897  1.1183  1.2604  1.5708  4.1918 
  family:  binomial 
  loss:    logistic_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           0 
  replications:       3 
  
  benefit score: f(x), 
  Trt recom = 1*I(f(x)>c)+0*I(f(x)<=c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                            Recommended 0                Recommended 1
  Received 0      1 (SE = 0, n = 13.6667)       0 (SE = 0, n = 7.3333)
  Received 1 0.0178 (SE = 0.0308, n = 14) 0.9822 (SE = 0.0308, n = 15)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=0,Recom=0]-E[Y|T=/=0,Recom=0] 
           0.9822 (SE = 0.0308, n = 27.6667) 
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
           0.9822 (SE = 0.0308, n = 22.3333) 
  
  Est of 
  E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                     
  0.9845 (SE = 0.0143) 
  family:  gaussian 
  loss:    sq_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           0 
  replications:       3 
  
  benefit score: f(x), 
  Trt recom = 1*I(f(x)<c)+0*I(f(x)>=c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                                   Recommended 0                  Recommended 1
  Received 0 -21.6124 (SE = 2.0772, n = 11.3333)   16.331 (SE = 5.8818, n = 11)
  Received 1  17.5852 (SE = 5.4919, n = 11.6667) -15.2551 (SE = 3.8687, n = 16)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=0,Recom=0]-E[Y|T=/=0,Recom=0] 
              -39.1976 (SE = 6.8804, n = 23) 
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
              -31.5861 (SE = 8.2886, n = 27) 
  
  Est of 
  E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                       
  -34.7681 (SE = 6.1677) 
  family:  binomial 
  loss:    logistic_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           Quant_67 
  replications:       3 
  
  benefit score: f(x), 
  Trt recom = 1*I(f(x)>c)+0*I(f(x)<=c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                            Recommended 0      Recommended 1
  Received 0 0.9904 (SE = 0.0166, n = 14)  0 (SE = 0, n = 7)
  Received 1 0.2142 (SE = 0.0512, n = 19) 1 (SE = 0, n = 10)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=0,Recom=0]-E[Y|T=/=0,Recom=0] 
                0.7762 (SE = 0.0352, n = 33) 
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                          1 (SE = 0, n = 17) 
  
  Est of E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                     
  0.8622 (SE = 0.0241) 
  
  <===============================================>
  
  family:  binomial 
  loss:    logistic_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           Quant_83 
  replications:       3 
  
  benefit score: f(x), 
  Trt recom = 1*I(f(x)>c)+0*I(f(x)<=c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                                 Recommended 0          Recommended 1
  Received 0 0.8633 (SE = 0.0713, n = 16.6667) 0 (SE = 0, n = 4.3333)
  Received 1  0.3924 (SE = 0.013, n = 24.3333) 1 (SE = 0, n = 4.6667)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=0,Recom=0]-E[Y|T=/=0,Recom=0] 
                0.4709 (SE = 0.0652, n = 41) 
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                           1 (SE = 0, n = 9) 
  
  Est of E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                     
  0.5783 (SE = 0.0779) 
  family:  binomial 
  loss:    logistic_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           Quant_67 
  replications:       3 
  
  benefit score: f(x), 
  Trt recom = 1*I(f(x)>c)+0*I(f(x)<=c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                         Recommended 0   Recommended 1
  Received 0 0.9904 (SE = 0.0166, 28%) 0 (SE = 0, 14%)
  Received 1 0.2142 (SE = 0.0512, 38%) 1 (SE = 0, 20%)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=0,Recom=0]-E[Y|T=/=0,Recom=0] 
                   0.7762 (SE = 0.0352, 66%) 
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                             1 (SE = 0, 34%) 
  
  Est of E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                     
  0.8622 (SE = 0.0241) 
  
  <===============================================>
  
  family:  binomial 
  loss:    logistic_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           Quant_83 
  replications:       3 
  
  benefit score: f(x), 
  Trt recom = 1*I(f(x)>c)+0*I(f(x)<=c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                              Recommended 0       Recommended 1
  Received 0 0.8633 (SE = 0.0713, 33.3333%) 0 (SE = 0, 8.6667%)
  Received 1  0.3924 (SE = 0.013, 48.6667%) 1 (SE = 0, 9.3333%)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=0,Recom=0]-E[Y|T=/=0,Recom=0] 
                   0.4709 (SE = 0.0652, 82%) 
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                             1 (SE = 0, 18%) 
  
  Est of E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                     
  0.5783 (SE = 0.0779) 
  family:  cox 
  loss:    cox_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           0 
  replications:       3 
  
  benefit score: f(x), 
  Trt recom = 1*I(f(x)>c)+0*I(f(x)<=c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                                   Recommended 0
  Received 0 16.2965 (SE = 14.0768, n = 10.3333)
  Received 1             0 (SE = 0, n = 16.6667)
                                 Recommended 1
  Received 0           0 (SE = 0, n = 10.6667)
  Received 1 1.1802 (SE = 1.0971, n = 12.3333)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=0,Recom=0]-E[Y|T=/=0,Recom=0] 
              16.2965 (SE = 14.0768, n = 27) 
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                1.1802 (SE = 1.0971, n = 23) 
  
  Est of 
  E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                       
  19.1715 (SE = 14.5546) 
  family:  cox 
  loss:    cox_loss_lasso 
  method:  weighting 
  
  validation method:  boot_bias_correction 
  cutpoint:           0 
  replications:       3 
  
  benefit score: f(x), 
  Trt recom = 1*I(f(x)>c)+0*I(f(x)<=c) where c is 'cutpoint'
  
  Average Bootstrap Bias-Corrected Outcomes:
                                   Recommended 0
  Received 0 25.3695 (SE = 23.6609, n = 17.3333)
  Received 1             0 (SE = 0, n = 25.6667)
                                 Recommended 1
  Received 0           0 (SE = 0, n = 27.3333)
  Received 1 1.5676 (SE = 0.3393, n = 29.6667)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=0,Recom=0]-E[Y|T=/=0,Recom=0] 
              25.3695 (SE = 23.6609, n = 43) 
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                1.5676 (SE = 0.3393, n = 57) 
  
  Est of 
  E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                       
  26.7188 (SE = 18.3878) 
  family:    gaussian 
  loss:      sq_loss_lasso 
  method:    weighting 
  cutpoint:  0 
  propensity 
  function:  propensity.func 
  
  benefit score: f_2(x): 2 vs 1,  f_3(x): 3 vs 1 
                 f_1(x): 0 
  maxval = max(f_2(x), f_3(x)) 
  which.max(maxval) = The trt level which maximizes maxval
  Trt recom = which.max(maxval)*I(maxval > c) + 1*I(maxval <= c) where c is 'cutpoint'
  
  Average Outcomes:
                 Recommended 1    Recommended 2     Recommended 3
  Received 1   19.0459 (n = 8) 22.9296 (n = 21)    -9.779 (n = 4)
  Received 2  -13.9114 (n = 2)  34.3338 (n = 4) -13.4677 (n = 36)
  Received 3 -27.1394 (n = 15)  -30.384 (n = 1)   34.6048 (n = 9)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                            43.4511 (n = 25) 
  Est of E[Y|T=2,Recom=2]-E[Y|T=/=2,Recom=2] 
                            17.6692 (n = 26) 
  Est of E[Y|T=3,Recom=3]-E[Y|T=/=3,Recom=3] 
                             47.623 (n = 49) 
  
  NOTE: The above average outcomes are biased estimates of
        the expected outcomes conditional on subgroups. 
        Use 'validate.subgroup()' to obtain unbiased estimates.
  
  ---------------------------------------------------
  
  Benefit score 1 quantiles (f(X) for 2 vs 1): 
       0%     25%     50%     75%    100% 
  -27.396 -12.246  -3.025   4.463  36.179 
  
  Benefit score 2 quantiles (f(X) for 3 vs 1): 
       0%     25%     50%     75%    100% 
  -77.157 -16.402   4.217  20.618  64.832 
  
  ---------------------------------------------------
  
  Summary of individual treatment effects: 
  E[Y|T=trt, X] - E[Y|T=1, X]
  where 'trt' is 2 and 3
  
       2-vs-1            3-vs-1        
   Min.   :-54.792   Min.   :-154.314  
   1st Qu.:-24.491   1st Qu.: -32.805  
   Median : -6.049   Median :   8.434  
   Mean   : -5.759   Mean   :   4.205  
   3rd Qu.:  8.927   3rd Qu.:  41.236  
   Max.   : 72.358   Max.   : 129.665  
  family:  gaussian 
  loss:    sq_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           0 
  replications:       2 
  
  benefit score: f_2(x): 2 vs 1,  f_3(x): 3 vs 1 
                 f_1(x): 0 
  maxval = max(f_2(x), f_3(x)) 
  which.max(maxval) = The trt level which maximizes maxval
  Trt recom = which.max(maxval)*I(maxval > c) + 1*I(maxval <= c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                              Recommended 1                  Recommended 2
  Received 1 10.6694 (SE = 5.0905, n = 2.5) 23.5046 (SE = 10.9023, n = 11)
  Received 2       -17.7078 (SE = 0, n = 1) 10.7534 (SE = 8.4347, n = 3.5)
  Received 3 -20.54 (SE = 16.2325, n = 6.5) -12.2912 (SE = 24.1696, n = 2)
                                Recommended 3
  Received 1         -9.2961 (SE = NA, n = 1)
  Received 2 -10.2918 (SE = 0.8272, n = 16.5)
  Received 3     38.7246 (SE = 1.2811, n = 6)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                30.2321 (SE = 7.211, n = 10) 
  Est of E[Y|T=2,Recom=2]-E[Y|T=/=2,Recom=2] 
            -2.1841 (SE = 10.3576, n = 16.5) 
  Est of E[Y|T=3,Recom=3]-E[Y|T=/=3,Recom=3] 
             48.9873 (SE = 2.1495, n = 23.5) 
  
  Est of 
  E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                      
  32.8607 (SE = 1.8565) 
  family:  gaussian 
  loss:    sq_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           Quant_33 
  replications:       2 
  
  benefit score: f_2(x): 2 vs 1,  f_3(x): 3 vs 1 
                 f_1(x): 0 
  maxval = max(f_2(x), f_3(x)) 
  which.max(maxval) = The trt level which maximizes maxval
  Trt recom = which.max(maxval)*I(maxval > c) + 1*I(maxval <= c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                           Recommended 1                    Recommended 2
  Received 1        NaN (SE = NA, n = 0)    18.8678 (SE = 6.8516, n = 13)
  Received 2        NaN (SE = NA, n = 0)     2.5752 (SE = 4.301, n = 4.5)
  Received 3 -40.9772 (SE = NA, n = 0.5) -13.8536 (SE = 10.5345, n = 3.5)
                                Recommended 3
  Received 1        6.5581 (SE = NA, n = 1.5)
  Received 2 -10.2918 (SE = 0.8272, n = 16.5)
  Received 3  30.3624 (SE = 0.3813, n = 10.5)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                      NaN (SE = NA, n = 0.5) 
  Est of E[Y|T=2,Recom=2]-E[Y|T=/=2,Recom=2] 
               -5.2539 (SE = 5.8186, n = 21) 
  Est of E[Y|T=3,Recom=3]-E[Y|T=/=3,Recom=3] 
             38.7019 (SE = 3.9695, n = 28.5) 
  
  Est of E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                     
  23.926 (SE = 1.9765) 
  
  <===============================================>
  
  family:  gaussian 
  loss:    sq_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           Quant_67 
  replications:       2 
  
  benefit score: f_2(x): 2 vs 1,  f_3(x): 3 vs 1 
                 f_1(x): 0 
  maxval = max(f_2(x), f_3(x)) 
  which.max(maxval) = The trt level which maximizes maxval
  Trt recom = which.max(maxval)*I(maxval > c) + 1*I(maxval <= c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                              Recommended 1                  Recommended 2
  Received 1    12.5108 (SE = 0.416, n = 6)  27.1464 (SE = 16.2619, n = 8)
  Received 2   -0.9162 (SE = 3.7784, n = 4) 19.7768 (SE = 6.2713, n = 1.5)
  Received 3 -5.1629 (SE = 5.7226, n = 9.5)    -52.8308 (SE = NA, n = 0.5)
                               Recommended 3
  Received 1      -8.8854 (SE = NA, n = 0.5)
  Received 2 -11.8208 (SE = 2.605, n = 15.5)
  Received 3  43.2393 (SE = 2.6129, n = 4.5)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
             16.7243 (SE = 2.6187, n = 19.5) 
  Est of E[Y|T=2,Recom=2]-E[Y|T=/=2,Recom=2] 
                2.2873 (SE = 3.6663, n = 10) 
  Est of E[Y|T=3,Recom=3]-E[Y|T=/=3,Recom=3] 
             55.0209 (SE = 5.2734, n = 20.5) 
  
  Est of E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                      
  34.9212 (SE = 1.8608) 
  family:    gaussian 
  loss:      sq_loss_lasso 
  method:    weighting 
  cutpoint:  0 
  propensity 
  function:  propensity.func 
  
  benefit score: f_2(x): 2 vs 1,  f_3(x): 3 vs 1 
                 f_1(x): 0 
  minval = min(f_2(x), f_3(x)) 
  which.min(minval) = The trt level which mininizes minval
  Trt recom = which.min(minval)*I(minval < c) + 1*I(minval >= c) where c is 'cutpoint'
  
  Average Outcomes:
                Recommended 1     Recommended 2    Recommended 3
  Received 1 -12.4322 (n = 3)    9.8045 (n = 3) 22.4903 (n = 27)
  Received 2  16.4907 (n = 8) -23.6155 (n = 28)  26.0746 (n = 6)
  Received 3  40.6803 (n = 3)  16.4944 (n = 13) -39.5066 (n = 9)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                           -45.4348 (n = 14) 
  Est of E[Y|T=2,Recom=2]-E[Y|T=/=2,Recom=2] 
                           -38.8184 (n = 44) 
  Est of E[Y|T=3,Recom=3]-E[Y|T=/=3,Recom=3] 
                           -63.7592 (n = 42) 
  
  NOTE: The above average outcomes are biased estimates of
        the expected outcomes conditional on subgroups. 
        Use 'validate.subgroup()' to obtain unbiased estimates.
  
  ---------------------------------------------------
  
  Benefit score 1 quantiles (f(X) for 2 vs 1): 
       0%     25%     50%     75%    100% 
  -38.019 -15.280  -2.716   8.065  47.504 
  
  Benefit score 2 quantiles (f(X) for 3 vs 1): 
        0%      25%      50%      75%     100% 
  -87.9996 -20.6829  -0.1399  25.7158  80.6450 
  
  ---------------------------------------------------
  
  Summary of individual treatment effects: 
  E[Y|T=trt, X] - E[Y|T=1, X]
  where 'trt' is 2 and 3
  
       2-vs-1            3-vs-1         
   Min.   :-76.037   Min.   :-175.9991  
   1st Qu.:-30.560   1st Qu.: -41.3659  
   Median : -5.433   Median :  -0.2799  
   Mean   : -3.886   Mean   :   3.5186  
   3rd Qu.: 16.130   3rd Qu.:  51.4315  
   Max.   : 95.008   Max.   : 161.2900  
  family:  gaussian 
  loss:    sq_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           0 
  replications:       2 
  
  benefit score: f_2(x): 2 vs 1,  f_3(x): 3 vs 1 
                 f_1(x): 0 
  minval = min(f_2(x), f_3(x)) 
  which.min(minval) = The trt level which minimizes minval
  Trt recom = which.min(minval)*I(minval < c) + 1*I(minval >= c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                              Recommended 1                   Recommended 2
  Received 1 -7.6413 (SE = 1.7594, n = 2.5)        12.6654 (SE = NA, n = 1)
  Received 2  17.6262 (SE = 7.506, n = 3.5) -22.9466 (SE = 2.413, n = 15.5)
  Received 3 35.436 (SE = 25.8686, n = 1.5)  14.7623 (SE = 9.1983, n = 7.5)
                                Recommended 3
  Received 1    21.6412 (SE = 7.1801, n = 15)
  Received 2             NaN (SE = NA, n = 0)
  Received 3 -58.7486 (SE = 20.9359, n = 3.5)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
            -38.7209 (SE = 18.7205, n = 7.5) 
  Est of E[Y|T=2,Recom=2]-E[Y|T=/=2,Recom=2] 
              -36.7141 (SE = 5.3783, n = 24) 
  Est of E[Y|T=3,Recom=3]-E[Y|T=/=3,Recom=3] 
           -80.3898 (SE = 13.7558, n = 18.5) 
  
  Est of 
  E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                       
  -49.6984 (SE = 7.4213) 
  family:  gaussian 
  loss:    sq_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           Quant_33 
  replications:       2 
  
  benefit score: f_2(x): 2 vs 1,  f_3(x): 3 vs 1 
                 f_1(x): 0 
  minval = min(f_2(x), f_3(x)) 
  which.min(minval) = The trt level which minimizes minval
  Trt recom = which.min(minval)*I(minval < c) + 1*I(minval >= c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                               Recommended 1                   Recommended 2
  Received 1  -0.7642 (SE = 1.8793, n = 5.5)      23.9965 (SE = NA, n = 0.5)
  Received 2     4.6264 (SE = 1.7437, n = 9)  -32.3163 (SE = 2.4258, n = 10)
  Received 3 30.2358 (SE = 16.5298, n = 4.5) 10.8171 (SE = 19.7325, n = 4.5)
                                Recommended 3
  Received 1  24.0305 (SE = 6.2936, n = 12.5)
  Received 2             NaN (SE = NA, n = 0)
  Received 3 -58.7486 (SE = 20.9359, n = 3.5)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
               -22.684 (SE = 9.1164, n = 19) 
  Est of E[Y|T=2,Recom=2]-E[Y|T=/=2,Recom=2] 
             -43.0046 (SE = 17.1246, n = 15) 
  Est of E[Y|T=3,Recom=3]-E[Y|T=/=3,Recom=3] 
             -82.7791 (SE = 14.6423, n = 16) 
  
  Est of E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                      
  -47.9076 (SE = 6.634) 
  
  <===============================================>
  
  family:  gaussian 
  loss:    sq_loss_lasso 
  method:  weighting 
  
  validation method:  training_test_replication 
  cutpoint:           Quant_67 
  replications:       2 
  
  benefit score: f_2(x): 2 vs 1,  f_3(x): 3 vs 1 
                 f_1(x): 0 
  minval = min(f_2(x), f_3(x)) 
  which.min(minval) = The trt level which minimizes minval
  Trt recom = which.min(minval)*I(minval < c) + 1*I(minval >= c) where c is 'cutpoint'
  
  Average Test Set Outcomes:
                          Recommended 1                  Recommended 2
  Received 1 -8.8854 (SE = NA, n = 0.5)      6.9658 (SE = NA, n = 1.5)
  Received 2 37.6038 (SE = NA, n = 0.5) -17.2941 (SE = 2.0479, n = 18)
  Received 3       NaN (SE = NA, n = 0)    25.8014 (SE = 8.169, n = 9)
                                Recommended 3
  Received 1  19.4638 (SE = 6.3201, n = 16.5)
  Received 2       11.2935 (SE = NA, n = 0.5)
  Received 3 -58.7486 (SE = 20.9359, n = 3.5)
  
  Treatment effects conditional on subgroups:
  Est of E[Y|T=1,Recom=1]-E[Y|T=/=1,Recom=1] 
                   -46.4892 (SE = NA, n = 1) 
  Est of E[Y|T=2,Recom=2]-E[Y|T=/=2,Recom=2] 
           -41.6569 (SE = 12.2513, n = 28.5) 
  Est of E[Y|T=3,Recom=3]-E[Y|T=/=3,Recom=3] 
           -78.0681 (SE = 14.4117, n = 20.5) 
  
  Est of E[Y|Trt received = Trt recom] - E[Y|Trt received =/= Trt recom]:                       
  -45.5441 (SE = 6.6993) 
  
  Hyperbolic Tangent kernel function. 
   Hyperparameters : scale =  1  offset =  1 
  
                                    
  C                    1.000 10.0000
  CV weighted accuracy 1.011  0.8894
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 567 SKIPPED: 0 FAILED: 1
  1. Error: test plotting for continuous outcomes with various options (@test-plotandplotcompare.R#152) 
  
  Error: testthat unit tests failed
  Execution halted