
glmnet Cox backend
glmnet-backend.RdWrappers that integrate glmnet Cox models into the peperr fit/complexity/prediction interface.
Usage
fit.glmnet(response, x, cplx, ...)
complexity.cv.glmnet(response, x, full.data, ...)
# S3 method for class 'coxnet'
predictProb(object, response, x, times, complexity = NULL, ...)
# S3 method for class 'coxnet'
PLL(object, newdata, newtime, newstatus, complexity = NULL, ...)Arguments
- response
survival response as a
Survobject or a two-columntime/statusmatrix.- x
covariate matrix.
- cplx
selected
lambdavalue forglmnet.- full.data
full data frame, accepted for the
peperrcomplexity-function contract.- object
a fitted
coxnetobject.- times
evaluation times for survival probabilities.
- complexity
selected
lambdavalue.- newdata
new covariate matrix.
- newtime
vector of follow-up times.
- newstatus
vector of event indicators.
- ...
additional arguments passed to
glmnet,cv.glmnet,survfit.coxnet, orpredict.
Value
fit.glmnet returns a fitted coxnet object. complexity.cv.glmnet returns a scalar lambda. predictProb.coxnet returns an n * length(times) survival-probability matrix. PLL.coxnet returns a numeric predictive partial log-likelihood.
Details
The backend stores the training design matrix and survival outcome on the fitted object so that the survfit.coxnet method can be reused later when pmpec calls predictProb.