derive_param_extreme_event {admiral} | R Documentation |
This function is deprecated, please use derive_extreme_records()
instead.
Add a new parameter for the first or last event occurring in a dataset. The
variable given in new_var
indicates if an event occurred or not. For
example, the function can derive a parameter for the first disease
progression.
derive_param_extreme_event(
dataset = NULL,
dataset_adsl,
dataset_source,
filter_source,
order = NULL,
new_var = NULL,
true_value = "Y",
false_value = "N",
mode = "first",
subject_keys = get_admiral_option("subject_keys"),
set_values_to,
check_type = "warning"
)
dataset |
Input dataset The |
dataset_adsl |
ADSL input dataset The variables specified for |
dataset_source |
Source dataset All observations in the specified dataset fulfilling the condition
specified by The variables specified by the |
filter_source |
Source filter All observations in For subjects with at least one event For all other subjects |
order |
Order variable List of symbols for sorting the source dataset ( Permitted Values: list of expressions created by |
new_var |
New variable The name of the variable which will indicate whether an event happened or not. |
true_value |
True value For all subjects with at least one observation in the source dataset
( |
false_value |
False value For all other subjects in |
mode |
Selection mode (first or last) If Permitted Values: |
subject_keys |
Variables to uniquely identify a subject A list of symbols created using |
set_values_to |
Variables to set A named list returned by |
check_type |
Check uniqueness? If Permitted Values: |
The source dataset (dataset_source
) is restricted to observations fulfilling
filter_source
.
For each subject (with respect to the variables specified for the
subject_keys
argument) either the first or last observation from the restricted
source dataset is selected. This is depending on mode
, (with respect to order
,
if applicable) where the event condition (filter_source
argument) is fulfilled.
For each observation in dataset_adsl
a new observation is created. For
subjects with event new_var
is set to true_value
. For all other
subjects new_var
is set to false_value
.
For subjects with event all variables from dataset_source
are kept. For
subjects without event all variables which are in both dataset_adsl
and
dataset_source
are kept.
The variables specified by the set_values_to
argument are added to
the new observations.
The new observations are added to input dataset.
The input dataset with a new parameter indicating if and when an event occurred
Other deprecated:
derive_var_basetype()
,
derive_var_confirmation_flag()
,
derive_var_last_dose_amt()
,
derive_var_last_dose_date()
,
derive_var_last_dose_grp()
,
derive_var_merged_cat()
,
derive_var_merged_character()
,
derive_vars_last_dose()