Compute the gradient of the partial likelihood at a particular fit
coxgrad(f, time, d, w, eps = 1e-05)
fit vector
time vector (can have ties)
death/censoring indicator 1/0
observation weights (default equal)
(default 0.00001) Breaks ties between death and censoring by making death times eps
earlier
a single gradient vector the same length as f
Compute a gradient vector at the fitted vector for the log partial likelihood.
This is like a residual vector, and useful for manual screening of predictors for glmnet
in applications where p
is very large (as in GWAS). Uses the Breslow approach to ties
coxnet.deviance