Predict Linear Predictors from a coxkl_enet Object
predict.coxkl_enet.RdComputes linear predictors for new data using a fitted coxkl_enet model.
If lambda is supplied, predictions are returned for those lambda
values; otherwise predictions are returned for all fitted lambdas. When a
requested lambda lies between fitted values, coefficients are linearly
interpolated.
Usage
# S3 method for class 'coxkl_enet'
predict(object, newz, lambda = NULL, ...)Arguments
- object
A fitted model object of class
"coxkl_enet".- newz
A numeric matrix or data frame of new covariates (same columns as in training data).
- lambda
Optional numeric value(s) specifying the regularization parameter(s) for which to predict. If
NULL, predictions for all fittedlambdavalues are returned.- ...
Additional arguments.
Value
A numeric matrix of linear predictors.
Each column corresponds to one lambda, sorted in descending order.