View source: R/predict_240608.R
predict.nested.glmnetr | R Documentation |
This is essentially a redirect to the summary.cv.glmnetr function for nested.glmnetr output objects, based uopn the cv.glmnetr output object contained in the nested.glmnetr output object.
## S3 method for class 'nested.glmnetr'
predict(object, xs_new = NULL, lam = NULL, gam = NULL, comment = TRUE, ...)
object |
A nested.glmnetr output object. |
xs_new |
The predictor matrix. If NULL, then betas are provided. |
lam |
The lambda value for choice of beta. If NULL, then lambda.min is used from the cross validation informed relaxed model. We use the term lam instead of lambda as lambda usually denotes a vector in the package. |
gam |
The gamma value for choice of beta. If NULL, then gamma.min is used from the cross validation informed relaxed model. We use the term gam instead of gamma as gamma usually denotes a vector in the package. |
comment |
Default of TRUE to write to console information on lam and gam selected for output. FALSE will suppress this write to console. |
... |
Additional arguments passed to the predict function. |
Either the xs_new*Beta estimates based upon the predictor matrix, or model coefficients.
predict.cv.glmnetr
, predict_ann_tab
, nested.glmnetr
sim.data=glmnetr.simdata(nrows=1000, ncols=100, beta=NULL)
xs=sim.data$xs
y_=sim.data$yt
event=sim.data$event
# for this example we use a small number for folds_n to shorten run time
fit3 = nested.glmnetr(xs, NULL, y_, event, family="cox", folds_n=3)
betas = predict(fit3)
betas$beta
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.