event_source: Create an 'event_source' Object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/derive_param_tte.R

Description

event_source objects are used to define events as input for the derive_param_tte() function.

Usage

1
event_source(dataset_name, filter = NULL, date, set_values_to = NULL)

Arguments

dataset_name

The name of the source dataset

The name refers to the dataset provided by the source_datasets parameter of derive_param_tte().

filter

An unquoted condition for selecting the observations from dataset which are events or possible censoring time points.

date

A variable providing the date of the event or censoring. A date, a datetime, or a character variable containing ISO 8601 dates can be specified. An unquoted symbol is expected.

set_values_to

A named list returned by vars() defining the variables to be set for the event or censoring, e.g. vars(EVENTDESC = "DEATH", SRCDOM = "ADSL", SRCVAR = "DTHDT"). The values must be a symbol, a character string, a numeric value, or NA.

Value

An object of class event_source, inheriting from class tte_source

Author(s)

Stefan Bundfuss

See Also

derive_param_tte(), censor_source()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Death event
event_source(
  dataset_name = "adsl",
  filter = DTHFL == "Y",
  date = DTHDT,
  set_values_to = vars(
    EVNTDESC = "DEATH",
    SRCDOM = "ADSL",
    SRCVAR = "DTHDT"
  )
)

epijim/admiral documentation built on Feb. 13, 2022, 12:15 a.m.