broom (version 0.4.4)

sexpfit_tidiers: 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 survexp
tidy(x, ...)

# S3 method for 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

Run this code
# NOT RUN {
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)
}

# }

Run the code above in your browser using DataLab