Label CKD stages or ESRD outcomes.
Usage
class_esrd_outcome(
df,
col,
years,
duration_col,
prefix = NULL,
create_years_col = TRUE
)
Arguments
- df
Data frame with an eGFR column.
- col
Column name with ESRD event indicator, 0 or 1.
- years
Integer horizon, 2 or 5.
- duration_col
Column name with follow up time in days.
- prefix
Optional prefix for the derived outcome column.
- create_years_col
Logical, add a <years>_year_outcome
column.
Value
The modified data frame with added label columns.
Examples
# class_esrd_outcome example
# class_esrd_outcome()