[R] Error using the mi package

Andrew Miles rstuff.miles at gmail.com
Thu Jul 15 16:48:13 CEST 2010


I'm trying to impute data using the mi package, but after running  
through almost the entire first round of imputations (which takes  
quite a while), it throws this error (I'll include the whole output  
prior to the error for context).  Does anyone know what is causing it,  
or how I can fix it?

More specifically, how can I tell what is throwing the error so I know  
what to fix?  Is it a problem with a variable?  With the formula I am  
using for imputations?

Beginning Multiple Imputation ( Thu Jul 15 09:10:33 2010 ):
Iteration 1
  Imputation 1 : min.func*  Tenure*  Salary*  Housing*  ord_stat*   
rural_now*  a3*  a7*  a8*  a9*  a10*  a12*  a13*  a14*  a15*  a16*   
a17a*  a17b*  a17c*  a17d*  a17e*  a17f*  a18*  a21*  b1a*  b1b*   
b1c*  b1d*  b1e*  b1f*  b1g*  b1h*  b1i*  b3a*  b3b*  b3c*  b3d*   
b3e*  b3f*  b3g*  b4a*  b4b*  b4c*  b4d*  b4e*  b4f*  b4g*  b4h*   
b4i*  b4j*  b4k*  b4l*  b4m*  b4n*  b4o*  b4p*  b5a*  b5b*  b5c*   
b5d*  b5e*  b5f*  b5g*  b5h*  b5i*  b5j*  b5k*  b5l*  b5m*  b5n*   
b5o*  b6a*  b6b*  b6c*  b6d*  b6e*  b6f*  b6g*  b6h*  b6i*  b6j*   
b6k*  b6l*  b7a*  b7b*  b7c*  b7d*  b7e*  b7f*  b7g*  b7h*  b7i*   
b7j*  b7k*  b9b*  b10a*  b10b*  b13a*  b13b*  b13c*  b14*  c3*  c4*   
c5*  c12a*  c12b*  c12c*  c12d*  c12e*  c12f*  c19*  d1*  d2*  d3*   
d6*  d7a*  d7b*  d7c*  d7d*  d7e*  d7f*  d7g*  d7h*  d7i*  d8a*  d8b*   
d8c*  d8d*  d8e*  d8f*  d8g*  d8h*  d8i*  d9a*  d9b*  d9c*  d9d*   
d9e*  d10a*  d10b*  d10c*  d10d*  d10e*  d10f*  d11*  d13*  d14*  e1*   
e2*  e3*  e5*  e6*  f2*  f3a*  f3b*  f3c*  f3d*  f3e*  f4*  f6*  f7*   
f8*  f9*  f12*  f14*  f15*  f16*  f20*  f21*  f22*  f23*  f25*  g2*   
g3*  g6*  g8*  g9*  g12*  g13*  g15*  g17*  g18*  g22*  g25*  g26*   
g27*  g28*  g31*  g34*  g43*  g55*  g58*  g59*  g60*  g61*  g63*   
g65*  g68a*  g68b*  g69*  g70*  g71*  g91*  g92*  g93*  g94*  g95*
Error in AveVar[s, i, ] <- c(avevar.mean, avevar.sd) :
   number of items to replace is not a multiple of replacement length

And here is what traceback() gives:
 > traceback()
3: .local(object, ...)
2: mi(imp.data, info = info2, n.iter = 6, preprocess = FALSE)
1: mi(imp.data, info = info2, n.iter = 6, preprocess = FALSE)

Andrew Miles



More information about the R-help mailing list