Impute dates and times when data are missing.
impute_dtc.Rd
Impute dates and times when data are missing.
Arguments
- data
A data.frame or equivalent object with at least the columns defined in the details section.
- na_ntod
What nominal time of day should unscheduled measurements be imputed as? (Often
0
is selected, but missing is the default.)
Details
Dates and times will be imputed based on the following rules:
If both date and time are observed, no the observed value will be used.
Data are assumed to be grouped by appropriate grouping factors within a nominal time so that all times may be at the same time, and data are assumed to be sorted in the order specified in the protocol.
If nominal time since first dose (NTSFD) is missing, no imputation will be performed (the measure is assumed to be unscheduled).
If dates differ within a nominal time measurement, no imputation will be performed (a data issue would appear to exist in that case).
If only one date exists within a nominal time measurement, missing dates will be assumed to match the observed date.
If one or more time exists within a nominal interval, all measurements in the interval will be assigned to the median of the times that exist.
Columns used in calculation are:
ADTC: (the date and time) formatted as an ISO8601 datetime without the time zone (yyyy-mm-ddThh:mm:ss) where the entire time or the seconds parts are optional.
STUDYID, USUBJID, NTSFD: grouping variables for the study number, subject identifier, and nominal time since first dose.
See also
Other Imputation:
impute_time_act_nom()
Other Date/time imputation:
impute_time_act_nom()