dot-process_survfit_time: Process Survival Fit For Time Estimates

.process_survfit_timeR Documentation

Process Survival Fit For Time Estimates

Description

Process Survival Fit For Time Estimates

Usage

.process_survfit_time(x, times, type, start.time = NULL)

Arguments

x

(survival::survfit())
a survival::survfit() object. See below for details.

times

(numeric)
a vector of times for which to return survival probabilities.

type

(string or NULL)
type of statistic to report. Available for Kaplan-Meier time estimates only, otherwise type is ignored. Default is NULL. Must be one of the following:

type transformation
"survival" x
"risk" 1 - x
"cumhaz" -log(x)
start.time

(numeric)
default starting time. See survival::survfit0() for more details.

Value

a tibble

Examples


survival::survfit(survival::Surv(AVAL, CNSR) ~ TRTA, cards::ADTTE) |>
  cardx:::.process_survfit_time(times = c(60, 180), type = "risk")


cardx documentation built on Sept. 11, 2024, 9:12 p.m.