Learn R Programming

bonsaiforest (version 0.1.1)

survival_curves: Average Survival Curves

Description

Function to obtain the average survival curve from all individual survival curves.

Usage

survival_curves(x, h0, est_coef)

Value

The survival probabilities at the sorted event times.

Arguments

x

(matrix)
the matrix with the subgroup covariates.

h0

(numeric)
the vector with the cumulative baseline hazard.

est_coef

(matrix)
the estimated coefficients from the fitted model.

Examples

Run this code
survival_curves(
  elastic_net_surv$x, elastic_net_surv$h0,
  elastic_net_surv$est_coef
)

Run the code above in your browser using DataLab