surv_tmerge: Tmerge Long Data

View source: R/surv_tmerge.R

surv_tmergeR Documentation

Tmerge Long Data

Description

This will take data in long form and create a tmerge dataframe that can be used in time dependent survival analysis

Usage

surv_tmerge(data, id, age, age_death, dead_censor, outcomes)

Arguments

data

dataframe in long form for outcome measurements

id

character string specifying subject in data

age

character string specifying age in data

age_death

character string specifiying age of death in data

dead_censor

character string specifying censor in data. A death is represented by 1 and censorship is represented by 0

outcomes

vector or list of strings specifying the outcome variables at each timepoint

Value

outputs dataframe with tstart, tstop, death that can be used for time dependent survival analysis

Author(s)

William Mueller

See Also

tmerge


wfmueller29/SLAM documentation built on April 5, 2025, 5:09 a.m.