censor_source {admiral}R Documentation

Create a censor_source Object

Description

censor_source objects are used to define censorings as input for the derive_param_tte() function.

Usage

censor_source(
  dataset_name,
  filter = NULL,
  date,
  censor = 1,
  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, 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 0 for events and positive integers for censoring.

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 censor_source, inheriting from class tte_source

Author(s)

Stefan Bundfuss

See Also

derive_param_tte(), event_source()

Source Specifications: assert_db_requirements(), assert_terms(), assert_valid_queries(), date_source(), death_event, derive_var_dthcaus(), event_source(), extend_source_datasets(), filter_date_sources(), format.sdg_select(), format.smq_select(), list_tte_source_objects(), params(), query(), sdg_select(), smq_select(), tte_source(), validate_query(), validate_sdg_select(), validate_smq_select()

Examples

# Last study date known alive censor
censor_source(
  dataset_name = "adsl",
  date = LSTALVDT,
  set_values_to = vars(
    EVNTDESC = "ALIVE",
    SRCDOM = "ADSL",
    SRCVAR = "LSTALVDT"
  )
)

[Package admiral version 0.8.4 Index]