I have a huge data
(4M x 17)
> testMice <- mice(myData[1:100000,]) # runs fine
> testTot <- predict(testMice, myData)
Error in UseMethod("predict") :
no applicable method for 'predict' applied to an object of class "mids"
hmisc provide the parameter estimates from the imputation process. Both
imputeMulti do. In both cases, you can extract the parameter estimates and use them for imputing your other observations.
Ameliaassumes your data are distributed as a multivariate normal (eg. X \sim N(\mu, \Sigma).
imputeMultiassumes that your data is distributed as a multivariate multinomial distribution. That is the complete cell counts are distributed (X \sim M(n,\theta)) where n is the number of observations.
Fitting can be done as follows, via example data. Examining parameter estimates is shown further below.
library(Amelia) library(imputeMulti) data(tract2221, package= "imputeMulti") test_dat2 <- tract2221[, c("gender", "marital_status","edu_attain", "emp_status")] # fitting IM_EM <- multinomial_impute(test_dat2, "EM",conj_prior = "non.informative", verbose= TRUE) amelia_EM <- amelia(test_dat2, m= 1, noms= c("gender", "marital_status","edu_attain", "emp_status"))
ameliafunction are found in
imputeMultiare found in
IM_EM@mle_x_yand can be accessed via the
imputeMulti has noticeably higher imputation accuracy for categorical data relative to either of the other 3 packages, though it only accepts multinomial (eg.
All of this information is in the currently unpublished vignette for
imputeMulti. The paper has been submitted to JSS and I am awaiting a response before adding the vignette to the package.