survdiff.survTerms {psichomics} | R Documentation

## Test differences between survival curves

### Description

Test differences between survival curves

### Usage

    survdiff.survTerms(survTerms, ...)

### Arguments

`survTerms` | survTerms object: processed survival terms
`...` | Arguments passed on to `survival::survdiff` subset expression indicating which subset of the rows of data should be used in the fit. This can be a logical vector (which is replicated to have length equal to the number of observations), a numeric vector indicating which observation numbers are to be included (or excluded if negative), or a character vector of row names to be included. All observations are included by default. na.action a missing-data filter function. This is applied to the `model.frame` after any subset argument has been used. Default is `options()$na.action`. rho a scalar parameter that controls the type of test. timefix process times through the `aeqSurv` function to eliminate potential roundoff issues.

### Value

an object of class "survfit". 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)
    survdiff.survTerms(survTerms)

[Package psichomics version 1.8.2 Index]