event_source objects are used to define events as input for the
derive_param_tte() function.
Note: This is a wrapper function for the more generic tte_source().
Arguments
- dataset_name
-
The name of the source dataset
The name refers to the dataset provided by the
source_datasetsparameter ofderive_param_tte().- Default value
none
- filter
-
An unquoted condition for selecting the observations from
datasetwhich are events or possible censoring time points.- Default value
NULL
- date
-
A variable or expression providing the date of the event or censoring. A date, or a datetime can be specified. An unquoted symbol or expression is expected.
Refer to
derive_vars_dt()orconvert_dtc_to_dt()to impute and derive a date from a date character vector to a date object.- Default value
none
- set_values_to
-
A named list returned by
exprs()defining the variables to be set for the event or censoring, e.g.exprs(EVENTDESC = "DEATH", SRCDOM = "ADSL", SRCVAR = "DTHDT"). The values must be a symbol, a character string, a numeric value, an expression, orNA.- Default value
NULL
- order
-
Sort order
An optional named list returned by
exprs()defining additional variables that the source dataset is sorted on afterdate.- Permitted values
list of variables created by
exprs()e.g.exprs(ASEQ).- Default value
order
See also
derive_param_tte(), censor_source()
Source Objects:
basket_select(),
censor_source(),
death_event,
event(),
event_joined(),
flag_event(),
query(),
records_source(),
tte_source()
Examples
# Death event
event_source(
dataset_name = "adsl",
filter = DTHFL == "Y",
date = DTHDT,
set_values_to = exprs(
EVNTDESC = "DEATH",
SRCDOM = "ADSL",
SRCVAR = "DTHDT"
)
)
#> <event_source> object
#> dataset_name: "adsl"
#> filter: DTHFL == "Y"
#> date: DTHDT
#> censor: 0
#> set_values_to:
#> EVNTDESC: "DEATH"
#> SRCDOM: "ADSL"
#> SRCVAR: "DTHDT"
#> order: NULL
