imputation - R - error of mice function - Error in `[<-.data.frame`(`*tmp*` -


i using mice function

imp <- mice(widedfnoid, method = meth, predictormatrix = pred1, print = true, max = 5, m = 1, seed = 9212, nnet.maxnwts = 10000) 

got error method vector:

error in `[<-.data.frame`(`*tmp*`, , i, value = list(`i(koep_y1.1 * (anx_y - 2.68733489644392))` = c(0,  :  replacement element 1 has 5118 rows, need 5616  

here part of method vector. has more 1000 entries can't post whole vector:

       hlang       ses  ...                                  koep_y1.1.anx_y1     "polyreg"     "pmm"  ...          "~i(koep_y1.1*(anx_y1-2.68733489644392))"  

i(koep_y1.1 * (anx_y1 - 2.68733489644392)) imputation method interaction between 2 variables: level 1 of categorical variable koep_y1 , continuous variable anx_y1. there many interactions imputed before interaction.

i can't figure out what's wrong vector or somewhere else in data, code.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -