Function to obtain the estimated treatment effect in each one of the considered subgroups.
Arguments
- object
(
bonsaiforest
)
the fitted bonsaiforest object.- est_coef
(
matrix
)
the estimated coefficients from the fitted model.- h0
(
numeric
)
the vector with the cumulative baseline hazard. Present just forresptype
survival.- gamma
(
scalar
)
numeric value defining the weights to obtain the average hazard ratio. Default is 1 (in this case the average hazard ratio obtained can be interpreted as the odds of concordance).
Examples
subgroups(
elastic_net_fit_surv, elastic_net_surv$est_coef,
elastic_net_surv$h0
)
#> subgroup trt.estimate
#> 1 x_1a 0.6500483
#> 2 x_1b 0.6493824
#> 3 x_2a 0.6493749
#> 4 x_2b 0.6501893
#> 5 x_3a 0.6497598
#> 6 x_3b 0.6489794
#> 7 x_4a 0.6474298
#> 8 x_4b 0.6467309
#> 9 x_4c 0.6467375
#> 10 x_5a 0.6497693
#> 11 x_5b 0.6495787
#> 12 x_5c 0.6493530
#> 13 x_5d 0.6489952
#> 14 x_6a 0.6485965
#> 15 x_6b 0.6494347
#> 16 x_7a 0.6489064
#> 17 x_7b 0.6498076
#> 18 x_8a 0.6496933
#> 19 x_8b 0.6495582
#> 20 x_8c 0.6499395
#> 21 x_9a 0.6487417
#> 22 x_9b 0.6497883
#> 23 x_10a 0.6498012
#> 24 x_10b 0.6495769
#> 25 x_10c 0.6492702