How to set MaxNWts value in R

被刻印的时光 ゝ 提交于 2019-12-12 06:48:14

问题


I am trying to impute categorical data through the mice package.

{qualiD = mice(quali,1, seed=123)}

And I get the following error:

{Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE, : too many (2184) weights}

I tried increasing the number of weights by including the MaxNWts param.

{qualiD = mice(quali,1, seed=123, MaxNWts = 3000)}

But then again i get this error:

{Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE, : formal argument "MaxNWts" matched by multiple actual arguments}


回答1:


Pass the argument using nnet.MaxNWts

qualiD = mice(quali,1, seed=123, nnet.MaxNWts = 3000)

This is described in the documentation of the mice imputation functions, e.g. mice.impute.polr



来源:https://stackoverflow.com/questions/43571859/how-to-set-maxnwts-value-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!