如何在R中设置MaxNWts值 [英] How to set MaxNWts value in R
问题描述
我正在尝试通过mouses包估算类别数据.
I am trying to impute categorical data through the mice package.
{qualiD = mice(quali,1, seed=123)}
然后出现以下错误:
{nnet.default中的错误(X,Y,w,掩码=掩码,大小= 0,跳过= TRUE, softmax = TRUE ,:权重过多(2184)}
{Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE, : too many (2184) weights}
我尝试通过包含MaxNWts参数来增加权重数量.
I tried increasing the number of weights by including the MaxNWts param.
{qualiD = mice(quali,1, seed=123, MaxNWts = 3000)}
但是再次出现此错误:
{nnet.default中的错误(X,Y,w,掩码=掩码,大小= 0,跳过= TRUE, softmax = TRUE ,:形式参数"MaxNWts"由多个匹配 实际参数}
{Error in nnet.default(X, Y, w, mask = mask, size = 0, skip = TRUE, softmax = TRUE, : formal argument "MaxNWts" matched by multiple actual arguments}
推荐答案
使用nnet.MaxNWts传递参数
Pass the argument using nnet.MaxNWts
qualiD = mice(quali,1, seed=123, nnet.MaxNWts = 3000)
这在小鼠归算功能的文档中进行了描述,例如mice.impute.polr
This is described in the documentation of the mice imputation functions, e.g. mice.impute.polr
这篇关于如何在R中设置MaxNWts值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!