# would also work # chf_pred_rsf # type="chf", # prediction_element = "chf", # times_element = "time.interest") chf_pred_rsf function(model, newdata, times) { survival_to_cumulative_hazard(surv_pred_rsf(model, newdata, times)) }
times $times) risk_pred_rsf times)
times $times) risk_pred_rsf times)
The reverse utility (cumulative_hazard_to_survival()) also exists.
If no risk prediction is provided for your model, you can use a utility to sum the cumulative hazard function for each observation to achieve risk scores. This approach is recommended by Ishwaran et al. and Sonabend et al.