Interaction with mitools #353
Replies: 3 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Dear Stef, This is the answer I got from the author of mitools. Apparently, there is a typo in the syntax you suggest in: mice: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software, December 2011, Volume 45, Issue 3, p.53 "The code you were given imputedsurv<- imputationList(lapply(1:5, complete, x = imp)) is incorrect, because the data argument to mice::complete is actually called 'data'. If you do imputedsurv<- imputationList(lapply(1:5, complete, data = imp)) it will work. The reason for the mysterious calls to tidyr is that mice imports the generic function complete() from tidyr. If your call to complete() doesn't have a mids object for the data= argument (because you've called it 'x'), the complete.mids() method will not be called. Instead the tidyr::complete.default method will be called. -thomas Thomas Lumley |
Beta Was this translation helpful? Give feedback.
-
Thanks for clearing this up.
|
Beta Was this translation helpful? Give feedback.
-
Dear fellows,
I have a set of imputed files created with MICE that I need to analyze with survey. When I use mitools to transfer them:
This is what I get:
Error in UseMethod("complete_") :
no applicable method for 'complete_' applied to an object of class "c('integer', 'numeric')"
In addition: Warning message:
complete_()
is deprecated as of tidyr 1.0.0.Please use
complete()
instead.Any idea why this is happening?
Thank you,
Ángel
Beta Was this translation helpful? Give feedback.
All reactions