censor_source objects are used to define censorings as input for the
derive_param_tte() function.
Arguments
- dataset_name
The name of the source dataset
The name refers to the dataset provided by the
source_datasetsparameter ofderive_param_tte().- filter
An unquoted condition for selecting the observations from
datasetwhich are events or possible censoring time points.- date
A variable providing the date of the event or censoring. A date, or a datetime can be specified. An unquoted symbol is expected.
Refer to
derive_vars_dt()to impute and derive a date from a date character vector to a date object.- censor
Censoring value
CDISC strongly recommends using
0for events and positive integers for censoring.- 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, orNA.
See also
derive_param_tte(), event_source()
Source Objects:
basket_select(),
date_source(),
death_event,
dthcaus_source(),
event_source(),
event(),
query(),
tte_source()
Examples
# Last study date known alive censor
censor_source(
dataset_name = "adsl",
date = LSTALVDT,
set_values_to = exprs(
EVNTDESC = "ALIVE",
SRCDOM = "ADSL",
SRCVAR = "LSTALVDT"
)
)
#> <censor_source> object
#> dataset_name: "adsl"
#> filter: NULL
#> date: LSTALVDT
#> censor: 1L
#> set_values_to:
#> EVNTDESC: "ALIVE"
#> SRCDOM: "ADSL"
#> SRCVAR: "LSTALVDT"
