derive_var_astdy {admiral}R Documentation

Derive Analysis Start Relative Day

Description

[Deprecated]

This function is deprecated, please use derive_vars_dy() instead.

Adds the analysis start relative day (ASTDY) to the dataset, i.e., study day of analysis start date.

Usage

derive_var_astdy(dataset, reference_date = TRTSDT, date = ASTDT)

Arguments

dataset

Input dataset

The columns specified by the reference_date and the date parameter are expected.

reference_date

The start date column, e.g., date of first treatment

A date or date-time object column is expected.

Refer to derive_vars_dt() to impute and derive a date from a date character vector to a date object.

The default is TRTSDT.

date

The end date column for which the study day should be derived

A date or date-time object column is expected.

Refer to derive_vars_dt() to impute and derive a date from a date character vector to a date object.

The default is ASTDT

Details

The study day is derived as number of days from the start date to the end date. If it is nonnegative, one is added. I.e., the study day of the start date is 1.

Value

The input dataset with ASTDY column added

Author(s)

Stefan Bundfuss


[Package admiral version 0.8.4 Index]