predict.coxph: predict coxph model

Description Usage Arguments Value

View source: R/survival_misc.R

Description

extend survival::predict.coxph to give 'median', 'mean' and a vector a survial quantile

Usage

1
2
3
## S3 method for class 'coxph'
predict(object, newdata, type = c("lp", "risk", "expected",
  "terms", "median", "mean", "prob"), max.surv.time = max(object$y[, 1]), ...)

Arguments

object

Coxph object

newdata

Newdata to predict

type

Type of prediction

max.surv.time

Usually maximum follow-up time

...

Other argument passed to survival : : predict.coxph

Value

a vector of predicted value or a matrix of survival probability if type = 'prob', with colnames = times


linxihui/lazyML documentation built on May 21, 2019, 6:39 a.m.