predict.coxph {survival} | R Documentation |
Compute fitted values and regression terms for a model fitted by coxph
## S3 method for class 'coxph': predict(object, newdata, type=c("lp", "risk", "expected", "terms"), se.fit=FALSE, terms=names(object$assign), collapse, safe=FALSE,...)
object |
A coxph object |
newdata |
Optional new data to predict at |
type |
Type of prediction wanted |
se.fit |
Return standard errors as well? |
terms |
If type="terms" , which terms to return. |
collapse |
identifier for which rows correspond to different individuals |
safe |
Use a more intensive `safe' prediction method |
... |
other unused arguments |
A vector or matrix of fitted values. If se.fit=TRUE
a list
whose first component is the fitted values and second is the standard errors.
fit<-coxph(Surv(time,status)~x,data=aml) predict(fit,type="lp") predict(fit,type="risk") predict(fit,type="expected") predict(fit,type="terms") predict(fit,type="lp",se.fit=TRUE) predict(fit,type="risk",se.fit=TRUE) predict(fit,type="expected",se.fit=TRUE) predict(fit,type="terms",se.fit=TRUE)