sexpfit_tidiers {broom} | R Documentation

## Tidy an expected survival curve

### Description

This constructs a summary across time points or overall of an expected survival curve. Note that this contains less information than most survfit objects.

### Usage

    ## S3 method for class 'survexp'
    tidy(x, ...)

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

### Arguments

`x` | "survexp" object
`...` | extra arguments (not used)

### Value

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

`tidy` returns a one row for each time point, with columns

`time` | time point
`estimate` | estimated survival
`n.risk` | number of individuals at risk

`glance` returns a one-row data.frame with the columns:

`n.max` | maximum number of subjects at risk
`n.start` | starting number of subjects at risk
`timepoints` | number of timepoints

### Examples

    if (require("survival", quietly = TRUE)) {
        sexpfit <- survexp(futime ~ 1, rmap=list(sex="male", year=accept.dt,
                                                 age=(accept.dt-birth.dt)),
                           method='conditional', data=jasa)

        tidy(sexpfit)
        glance(sexpfit)
    }

[Package broom version 0.4.1 Index]