tdc_in_study: participants over time

Description Usage Arguments Value

View source: R/tdc_functions.R

Description

survival::tmerge creates time periods (per patient) starting at 'tstart' and ending at 'tstop'. This function counts the number of individuals in the study at each time point of interest (set of all distinct time points starting or ending an interval). For each such point, a patient is in the study at T if they have a time period starting at, or before, T, AND the corresponding end strictly after T.

Usage

1
tdc_in_study(x, tstart = "tstart", tstop = "tstop")

Arguments

x

data frame with time periods starting at tstart, ending at tstop.

tstart

name of variable acting as tstart

tstop

name of variable acting as tstop

Value

data frame with variables 'time' and 'in.study' (count)


renlund/dm documentation built on Jan. 18, 2022, 9:50 a.m.