鼠标包的错误不明确 [英] Unclear error with mice package
问题描述
我正在使用mouses包对一些缺失值进行插值.我已经成功地在许多情况下成功使用了鼠标,没有任何问题.但是,我现在面临一个前所未有的问题,即在第一次迭代后,出现以下错误:
I'm using the mice package to interpolate some missing values. I've successfully been using mice in many cases without any problem. However I am now facing an unprecedented problem, that is, after the first iteration I get the following error:
mice(my_data)
iter imp variable
1 1 sunlight
Show Traceback
Rerun with Debug
Error in cor(xobs[, keep, drop = FALSE], use = "all.obs") : 'x' is empty
我试图查看文档,但是找不到任何有用的东西.我在互联网上查找了错误,并找到了 https://stat.ethz.ch/pipermail/r-help/2015-December/434914.html ,但我找不到所描述问题的答案.
I have tried to look in the documentation but I cannot find anything useful. I looked up the error on the internet and found this https://stat.ethz.ch/pipermail/r-help/2015-December/434914.html but I was unable to find the answer to the problem described.
可悲的是,由于my_data包含我不拥有的私有数据,因此无法公开提供数据,因此我无法提供该数据的有效示例. my_data是dplyr数据帧,但是使用dplyr或基本"数据帧似乎没有什么区别.
Sadly I cannot provide a working example of the data since my_data contains private data that I do not own and therefore cannot make publicly available. my_data is a dplyr dataframe however it looks like there's no difference in using a dplyr or a "base" dataframe.
任何人都可以解释一下正在发生的事情以及(可能)如何解决它吗?谢谢.
Could anyone please explain me what is happening and (possibly) how to fix it? Thank you.
添加了有关回溯的更多信息:
added some more info on traceback:
cor(xobs[, keep, drop = FALSE], use = "all.obs")
4 remove.lindep(x, y, ry, ...)
3 sampler(p, data, m, imp, r, visitSequence, c(from, to), printFlag,
...)
2 mice::mice(my_data)
推荐答案
很有可能,数据输入中的某些列过于相关,以至于某些插补方法不适用.
Very possible, some columns in the data input are overly correlated that certain methods of imputation are not applicable.
这篇关于鼠标包的错误不明确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!