predict.pcoxtime | R Documentation |
Compute fitted values and model terms for the pcoxtime model.
## S3 method for class 'pcoxtime' predict( object, ..., newdata = NULL, type = c("lp", "risk", "expected", "terms", "survival"), terms = object$predictors, 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(heart, package="survival") lam <- 0.1 alp <- 0.8 pfit <- pcoxtime(Surv(start, stop, event) ~ age + year + surgery + transplant , data = heart , lambda = lam , alpha = alp ) predict(pfit, type = "lp") predict(pfit, type = "expected") predict(pfit, type = "risk") predict(pfit, type = "survival") predict(pfit, type = "terms")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.