predict.nestcv.glmnet {nestedcv} | R Documentation |
Predict method for nestcv.glmnet fits
Description
Obtains predictions from the final fitted model from a nestcv.glmnet object.
Usage
## S3 method for class 'nestcv.glmnet'
predict(object, newdata, s = object$final_param["lambda"], modify = FALSE, ...)
Arguments
object |
Fitted |
newdata |
New data to predict outcome on |
s |
Value of lambda for glmnet prediction |
modify |
Logical whether to modify |
... |
Other arguments passed to |
Details
Checks for missing predictors and if these are sparse (i.e. have zero coefficients) columns of 0 are automatically added to enable prediction to proceed.
Value
Object returned depends on the ...
argument passed to predict
method for glmnet
objects.
See Also
[Package nestedcv version 0.7.9 Index]