get_event_types: Exctract event types

View source: R/as-ped.R

get_event_typesR Documentation

Exctract event types

Description

Given a formula that specifies the status variable of the outcome, this function extracts the different event types (except for censoring, specified by censor_code).

Usage

get_event_types(data, formula, censor_code)

Arguments

data

Either an object inheriting from data frame or in case of time-dependent covariates a list of data frames (of length 2), where the first data frame contains the time-to-event information and static covariates while the second (and potentially further data frames) contain information on time-dependent covariates and the times at which they have been observed.

formula

A two sided formula with a Surv object on the left-hand-side and covariate specification on the right-hand-side (RHS). The RHS can be an extended formula, which specifies how TDCs should be transformed using specials concurrent and cumulative. The left hand-side can be in start-stop-notation. This, however, is only used to create left-truncated data and does not support the full functionality.

censor_code

Specifies the value of the status variable that indicates censoring. Often this will be 0, which is the default.


pammtools documentation built on July 26, 2023, 6:07 p.m.