Learn R Programming

pammtools (version 0.2.4)

get_tdc: Extract time-dependent covariates from data set

Description

For all covariates in the data set, this functions checks if the values of the covariate changes per ID or other grouping variable. Returns the names of variables that change over time.

Usage

get_tdc(data, id_var)

Arguments

data

A data frame (potentially) containing time-dependent covariates.

id_var

A character indicating the grouping variable. For each covariate it will be checked if their values change within a group specified by id_var.

Value

A character vector containing names of variables that are not constant in each group (id_var).