NelsonAalen: Cox-Oakes extension of the Nelson-Aalen estimates for a Cox model
Description
Implementing the heuristic Cox and Oakes extension of the Nelson-Aalen estimate for Cox model to extract individual-specific survival. Time-to-event predictions are then given at the first time point at which an individual reaches an event probability of 50
Predicted times-to-event predictions either for the training data or an optional provided novel dataset
Arguments
b
Beta coefficients at optimal glmnet coxnet model (lambda, alpha)
Xold
Data matrix with rows as individuals (i.e. training data)
Xnew
Possible new prediction data matrix (if omitted the training data is used, or if it is a new dataset the columns should comform to the training data and new individuals be provided as rows)
events
Deaths or right-censoring per each individual (1 death 0 alive censored) for Xold
time
Times to event or censoring for Xold
tpred
The predicted time points; more tight grid gives a smoother curve
plot
Should an individualized plot be plotted to show how the cumulative survival curves behave