The
derive_var_dthcaus()
function has been deprecated in favor of derive_vars_extreme_event().
Derive death cause (DTHCAUS) and add traceability variables if required.
Usage
derive_var_dthcaus(
dataset,
...,
source_datasets,
subject_keys = get_admiral_option("subject_keys")
)Arguments
- dataset
-
Input dataset
The variables specified by the
subject_keysargument are expected to be in the dataset.- Default value
none
- ...
-
Objects of class "dthcaus_source" created by
dthcaus_source().- Default value
none
- source_datasets
-
A named
listcontaining datasets in which to search for the death cause- Default value
none
- subject_keys
-
Variables to uniquely identify a subject
A list of expressions where the expressions are symbols as returned by
exprs()is expected.- Default value
get_admiral_option("subject_keys")
Details
This function derives DTHCAUS along with the user-defined traceability
variables, if required. If a subject has death info from multiple sources,
the one from the source with the earliest death date will be used. If dates are
equivalent, the first source will be kept, so the user should provide the inputs in
the preferred order.
