survfit.survTerms {psichomics} | R Documentation

## Compute estimates of survival curves

### Description

Compute estimates of survival curves

### Usage

    ## S3 method for class 'survTerms'
    survfit(survTerms, ...)

### Arguments

`survTerms` | `survTerms` object: processed survival terms
`...` | Arguments passed on to `survival::survfit.formula` weights The weights must be nonnegative and it is strongly recommended that they be strictly positive, since zero weights are ambiguous, compared to use of the `subset` argument. subset expression saying that only a subset of the rows of the data should be used in the fit. na.action a missing-data filter function, applied to the model frame, after any `subset` argument has been used. Default is `options()$na.action`. etype a variable giving the type of event. This has been superseded by multi-state Surv objects; see example below. id identifies individual subjects, when a given person can have multiple lines of data. istate for multi-state models, identifies the initial state of each subject timefix process times through the `aeqSurv` function to eliminate potential roundoff issues.

### Value

`survfit` object. See `survfit.object` for details. Methods defined for survfit objects are `print`, `plot`, `lines`, and `points`.

### Examples

    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)

[Package psichomics version 1.6.2 Index]