| survfit.survTerms {psichomics} | R Documentation |
Compute estimates of survival curves
## S3 method for class 'survTerms' survfit(survTerms, ...)
survTerms |
|
... |
Arguments passed on to
|
survfit object. See survfit.object for details. Methods
defined for survfit objects are print, plot, lines, and
points.
clinical <- read.table(text = "2549 NA ii female
840 NA i female
NA 1204 iv male
NA 383 iv female
1293 NA iii male
NA 1355 ii male")
names(clinical) <- c("patient.days_to_last_followup",
"patient.days_to_death",
"patient.stage_event.pathologic_stage",
"patient.gender")
timeStart <- "days_to_death"
event <- "days_to_death"
formulaStr <- "patient.stage_event.pathologic_stage + patient.gender"
survTerms <- processSurvTerms(clinical, censoring="right", event, timeStart,
formulaStr=formulaStr)
require("survival")
survfit(survTerms)