surv_aj: Fit a KM estimate with only one covariate

View source: R/utils.R

surv_ajR Documentation

Fit a KM estimate with only one covariate

Description

Wrapper around 'survival::survfit.formula' for allowing the use of 'purrr::map' and fit several one covariate KM estimates at a time.

Usage

surv_aj(x, data, time = "time", event = "event", ...)

Arguments

x

name of the covariate column.

data

data.frame with the survival data.

time

name of the time variable column.

event

name of the censor/death variable column.

...

extra arguments passed to 'survival::survfit'.

Value

an object of class "survfit". See survfit.object for details. Methods defined for survfit objects are print, plot, lines, and points.

See Also

survfit.formula


vitorcapdeville/survtools documentation built on Feb. 12, 2023, 12:01 p.m.