R: Tidiers for Tests of Differences between Survival Curves

survdiff_tidiers {broom} | R Documentation

## Tidiers for Tests of Differences between Survival Curves

### Description

Tidiers for Tests of Differences between Survival Curves

### Usage

    ## S3 method for class 'survdiff'
    tidy(x, strata = FALSE, ...)

    ## S3 method for class 'survdiff'
    glance(x, ...)

### Arguments

`x` | a "survdiff" object
`strata` | logical, whether to include strata in the output
`...` | other arguments passed to/from other methods, currently ignored

### Value

All tidying methods return a data.frame without rownames, whose structure depends on the method chosen.

`tidy` on "survdiff" objects returns a data frame with the following columns:

`...` | initial column(s) correspond to grouping factors (right-hand side of the formula)
`obs` | weighted observed number of events in each group
`exp` | weighted expected number of events in each group
`N` | number of subjects in each group

`glance` on "survdiff" objects returns a data frame with the following columns:

`statistic` | value of the test statistic
`df` | degrees of freedom
`p.value` | p-value

### See Also

`survdiff`

### Examples

    if( require("survival") ) {
        s <- survdiff( Surv(time, status) ~ pat.karno + strata(inst), data=lung)
        tidy(s)
        glance(s)
    }

[Package broom version 0.4.4 Index]