[R] mice and Date-Time Classes

Andreas Wittmann andreas_wittmann at gmx.de
Thu Jul 16 22:09:35 CEST 2009


Dear R-Users,

i want to use the function mice of the mice package with data, that 
contains dates, but this gives an error

x <- Sys.time()
dat <- data.frame(dates=(1:10)*60*60*24+x, size=rnorm(10))
dat$dates[c(3,7)]<-NA

mice(dat)

Fehler in check.imputationMethod(imputationMethod, 
defaultImputationMethod,  :
  The following functions were not found: mice.impute.

I guess the mice package is not implemented for the POSIXt data class yet.
A workaround could be to build time intervals and use mice with that and 
transform it back afterwards. Or is there a more efficient way?

Many thanks if anyone could tell me what i do wrong and what is the 
problem here.

best regards

Andreas




More information about the R-help mailing list