survival_curves function

Average Survival Curves

Average Survival Curves

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

survival_curves(x, h0, est_coef)

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.

Returns

The survival probabilities at the sorted event times.

Examples

survival_curves( elastic_net_surv$x, elastic_net_surv$h0, elastic_net_surv$est_coef )