[R] mice and Date-Time Classes

Uwe Ligges ligges at statistik.tu-dortmund.de
Mon Jul 20 10:50:52 CEST 2009



Andreas Wittmann wrote:
> 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?



I think you are completely right.

You may want to provide a method for the mice maintainer who will 
certainly be happy about your contribution.

Best,
Uwe Ligges


> Many thanks if anyone could tell me what i do wrong and what is the 
> problem here.
> 
> best regards
> 
> Andreas
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list