sexpfit_tidiers {broom} | R Documentation |
This constructs a summary across time points or overall of an expected survival curve. Note that this contains less information than most survfit objects.
## S3 method for class 'survexp' tidy(x, ...) ## S3 method for class 'survexp' glance(x, ...)
x |
"survexp" object |
... |
extra arguments (not used) |
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 |
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) }