View source: R/glmnetsurvfit.R
predict.glmnetsurv | R Documentation |
Compute fitted values and model terms for the glmnetsurv model.
## S3 method for class 'glmnetsurv' predict( object, ..., newdata = NULL, type = c("lp", "risk", "terms"), terms = names(object$assign), na.action = na.pass )
object |
fitted |
... |
for future implementations. |
newdata |
optional data frame containing the variables appearing on the right hand side of |
type |
the type of predicted value. Either linear predictor ( |
terms |
if |
na.action |
defines the missing value action for the |
The computation of these predictions similar to those in predict.coxph
. Our current implementation does not incorporate stratification.
a vector of predictions, depending on the type
.
data(veteran, package="survival") # Penalized lam <- 0.02 alp <- 1 gfit1 <- glmnetsurv(Surv(time, status) ~ factor(trt) + karno + diagtime + age + prior , data = veteran , alpha = alp , lambda = lam ) predict(gfit1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.