Amelia
Amelia copied to clipboard
Bug when `NA`s are present in date/time variables supplied to `idvars`
amcheck() checks to see if there are any NA values in any POSIXt (date/time) variables in the dataset and throws an error if so, but it runs the check for all variables in the dataset, not just those not named in idvars. It should ignore variables named in idvars, as these will neither be imputed nor used in the imputation but may exist in the dataset as metadata. The simple fix is to exclude the idvars variables in the check for POSIXt variables.
https://github.com/IQSS/Amelia/blob/4de630622704d2fed205a2f2f7b5923f00b3238c/R/amcheck.r#L941-L947