View source: R/derive_vars_dtm.R
restrict_imputed_dtc_dtm | R Documentation |
Restrict Imputed DTC date to Minimum/Maximum Dates
restrict_imputed_dtc_dtm(dtc, imputed_dtc, min_dates, max_dates)
dtc |
The A character date is expected in a format like |
imputed_dtc |
The imputed DTC date |
min_dates |
Minimum dates A list of dates is expected. It is ensured that the imputed date is not
before any of the specified dates, e.g., that the imputed adverse event start
date is not before the first treatment date. Only dates which are in the
range of possible dates of the impute_dtc_dtm( "2020-11", min_dates = list( ymd_hms("2020-12-06T12:12:12"), ymd_hms("2020-11-11T11:11:11") ), highest_imputation = "M" ) returns For date variables (not datetime) in the list the time is imputed to
|
max_dates |
Maximum dates A list of dates is expected. It is ensured that the imputed date is not after any of the specified dates, e.g., that the imputed date is not after the data cut off date. Only dates which are in the range of possible dates are considered. A date or date-time object is expected. For date variables (not datetime) in the list the time is imputed to
|
The last of the minimum dates (min_dates
) which are in the range of the
partial DTC date (dtc
)
The first of the maximum dates (max_dates
) which are in the range of the
partial DTC date (dtc
)
imputed_dtc
if the partial DTC date (dtc
) is not in range of any of
the minimum or maximum dates.
impute_dtc_dtm()
, impute_dtc_dt()
Utilities used for date imputation:
dt_level()
,
dtm_level()
,
get_imputation_target_date()
,
get_imputation_target_time()
,
get_partialdatetime()
,
restrict_imputed_dtc_dt()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.