survfit2df {autoReg}R Documentation

Extract survival data from an object of class "survfit"

Description

Extract survival data from an object of class "survfit"

Usage

survfit2df(fit, labels = NULL)

Arguments

fit

An object of class "survfit"

labels

Character

Value

A data.frame

Examples

library(survival)
data(cancer,package="survival")
fit=survfit(coxph(Surv(time,status)~sex+age+strata(rx),data=colon))
survfit2df(fit)
## Not run: 
fit=coxph(Surv(time,status)~sex+age+strata(rx),data=colon)
fit=survfit(as.formula(deparse(fit$terms)),data=fit2model(fit))
survfit2df(fit)
fit=survfit(Surv(time,status)~rx+sex+age,data=colon)
survfit2df(fit)
fit=survfit(Surv(time,status)~1,data=colon)
survfit2df(fit)

## End(Not run)

[Package autoReg version 0.3.3 Index]