Skip to contents

Function to create a data set with the results for all the methods in order to compare them.

Usage

compare(...)

Arguments

...

Objects of class bonsaiforest. We write them separated by a comma.

Value

List with a data.frame of the estimated subgroup treatment effects, with the overall treatment effect and with the response type of our data.

Examples

compare(naivepop_fit_surv, naive_fit_surv, elastic_net_fit_surv)
#> $data
#>    subgroup trt.estimate   trt.low  trt.high                 model
#> 1      x_1a    0.6741880 0.4693783 0.9683648                 Naive
#> 2      x_1b    0.6645867 0.4663568 0.9470762                 Naive
#> 3      x_2a    0.7087873 0.4743926 1.0589952                 Naive
#> 4      x_2b    0.6424496 0.4636818 0.8901394                 Naive
#> 5      x_3a    0.5054825 0.3003642 0.8506759                 Naive
#> 6      x_3b    0.7168399 0.5365623 0.9576884                 Naive
#> 7      x_4a    0.6213593 0.4133445 0.9340571                 Naive
#> 8      x_4b    0.5428680 0.3372320 0.8738959                 Naive
#> 9      x_4c    0.8575696 0.5483543 1.3411505                 Naive
#> 10     x_5a    1.0714912 0.5843316 1.9647978                 Naive
#> 11     x_5b    0.3981145 0.1911053 0.8293607                 Naive
#> 12     x_5c    0.5966367 0.3719363 0.9570869                 Naive
#> 13     x_5d    0.6818581 0.4569275 1.0175148                 Naive
#> 14     x_6a    0.7500611 0.4833380 1.1639715                 Naive
#> 15     x_6b    0.6203688 0.4551697 0.8455251                 Naive
#> 16     x_7a    0.4884324 0.3137099 0.7604677                 Naive
#> 17     x_7b    0.7883981 0.5775406 1.0762388                 Naive
#> 18     x_8a    0.5723798 0.3253240 1.0070535                 Naive
#> 19     x_8b    0.5663128 0.3505993 0.9147486                 Naive
#> 20     x_8c    0.7809059 0.5485165 1.1117516                 Naive
#> 21     x_9a    0.4616452 0.2454835 0.8681493                 Naive
#> 22     x_9b    0.7164771 0.5426620 0.9459653                 Naive
#> 23    x_10a    0.6844865 0.3818088 1.2271109                 Naive
#> 24    x_10b    0.7063065 0.4515212 1.1048625                 Naive
#> 25    x_10c    0.6366207 0.4435313 0.9137708                 Naive
#> 26     x_1a    0.6500483 0.6500483 0.6500483 Elastic net alpha = 1
#> 27     x_1b    0.6493824 0.6493824 0.6493824 Elastic net alpha = 1
#> 28     x_2a    0.6493749 0.6493749 0.6493749 Elastic net alpha = 1
#> 29     x_2b    0.6501893 0.6501893 0.6501893 Elastic net alpha = 1
#> 30     x_3a    0.6497598 0.6497598 0.6497598 Elastic net alpha = 1
#> 31     x_3b    0.6489794 0.6489794 0.6489794 Elastic net alpha = 1
#> 32     x_4a    0.6474298 0.6474298 0.6474298 Elastic net alpha = 1
#> 33     x_4b    0.6467309 0.6467309 0.6467309 Elastic net alpha = 1
#> 34     x_4c    0.6467375 0.6467375 0.6467375 Elastic net alpha = 1
#> 35     x_5a    0.6497693 0.6497693 0.6497693 Elastic net alpha = 1
#> 36     x_5b    0.6495787 0.6495787 0.6495787 Elastic net alpha = 1
#> 37     x_5c    0.6493530 0.6493530 0.6493530 Elastic net alpha = 1
#> 38     x_5d    0.6489952 0.6489952 0.6489952 Elastic net alpha = 1
#> 39     x_6a    0.6485965 0.6485965 0.6485965 Elastic net alpha = 1
#> 40     x_6b    0.6494347 0.6494347 0.6494347 Elastic net alpha = 1
#> 41     x_7a    0.6489064 0.6489064 0.6489064 Elastic net alpha = 1
#> 42     x_7b    0.6498076 0.6498076 0.6498076 Elastic net alpha = 1
#> 43     x_8a    0.6496933 0.6496933 0.6496933 Elastic net alpha = 1
#> 44     x_8b    0.6495582 0.6495582 0.6495582 Elastic net alpha = 1
#> 45     x_8c    0.6499395 0.6499395 0.6499395 Elastic net alpha = 1
#> 46     x_9a    0.6487417 0.6487417 0.6487417 Elastic net alpha = 1
#> 47     x_9b    0.6497883 0.6497883 0.6497883 Elastic net alpha = 1
#> 48    x_10a    0.6498012 0.6498012 0.6498012 Elastic net alpha = 1
#> 49    x_10b    0.6495769 0.6495769 0.6495769 Elastic net alpha = 1
#> 50    x_10c    0.6492702 0.6492702 0.6492702 Elastic net alpha = 1
#> 
#> $overall_trt
#> [1] 0.666919
#> 
#> $resptype
#> [1] "survival"
#> 
#> attr(,"class")
#> [1] "compare.data"