R:MICE库未运行所有指定的列

问题描述 投票:1回答:1

我已将所有数据转换为因数,并指定了我不想在插补过程中包括的列:

cols = keep_rows[ , -c(1, 11, 12, 13, 14, 15, 16, 17, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57)]

impute_vals = mice(cols, nnet.MaxNWts = 100000, threshold = 1, m=1, maxit = 2)

当我运行此程序时,MICE只运行14列,但还有大约10列要运行。我想知道它们在哪里吗?

这里是MICE正在处理的唯一变量和出现的错误:

 iter imp variable
1   1  Gender  Age  Income  q4k  Q7K  Q10C2  Q10C3  Q10C4  Q10C5  Q10C6  Q10C7  Q11C5  Q13C5  Q13C6  Q14C
2   1  Gender  Age  Income  q4k  Q7K  Q10C2  Q10C3  Q10C4  Q10C5  Q10C6  Q10C7  Q11C5  Q13C5  Q13C6  Q14C
Warning messages:
1: glm.fit: algorithm did not converge 
2: glm.fit: algorithm did not converge 
3: glm.fit: algorithm did not converge 
4: Number of logged events: 30 

这里是我的数据框的摘要:

enter image description here有任何想法吗?谢谢!

r machine-learning data-science data-analysis r-mice
1个回答
0
投票

无法从您提供的信息中准确分辨出来,但警告消息很可能是融合失败的产物。您指定了非常小的maxit = 2,对于初学者,我会将其至少提高到10,然后尝试打开printFlag = TRUE

© www.soinside.com 2019 - 2024. All rights reserved.