Learn R Programming

bonsaiforest (version 0.1.1)

subgroups: Subgroup Treatment Effect

Description

Function to obtain the estimated treatment effect in each one of the considered subgroups.

Usage

subgroups(object, est_coef, h0 = NULL, gamma = 1)

Value

data.frame with the subgroup names and with the estimated subgroup treatment effects.

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 for resptype 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

Run this code
subgroups(
  elastic_net_fit_surv, elastic_net_surv$est_coef,
  elastic_net_surv$h0
)

Run the code above in your browser using DataLab