round_km: Rounded Kaplan-Meier curves

View source: R/redaction.R

round_kmR Documentation

Rounded Kaplan-Meier curves

Description

Rounded Kaplan-Meier curves

Usage

round_km(data, time, event, strata = NULL, threshold = 6)

Arguments

data

A data frame containing the required survival times

time

Event/censoring time variable, supplied as a character. Must be numeric >0

event

Event indicator variables supplied as a character. Censored (0/FALSE) or not (1/TRUE). Must be logical or integer with values zero or one

strata

names of stratification / grouping variables, supplied as a character vector of variable names

threshold

Redact threshold to apply

Details

This function rounds Kaplan-Meier survival estimates by delaying events times until at least threshold events have occurred.

Value

A tibble with rounded numbers of at risk, events, censored, and derived survival estimates, by strata


wjchulme/osutils documentation built on Dec. 20, 2024, 9:56 a.m.