多重插补的池化结果,pool()函数错误,mice包

Pooling results of multiple imputation, pool() function error, mice package

我不熟悉多重插补。我按照在网上找到的教程进行操作,并对自己的数据进行了多重插补。一切顺利,直到最后一步,我需要将来自不同数据集的结果与估算值汇集在一起​​。 R 给了我以下错误信息:

pool(rep1_mi)
Error: No tidy method for objects of class qr
In addition: Warning messages:
1: In get.dfcom(object, dfcom) : Infinite sample size assumed.
2: 'tidy.numeric' is deprecated.
See help("Deprecated") 
3: 'tidy.numeric' is deprecated.
See help("Deprecated") 
4: 'tidy.numeric' is deprecated.
See help("Deprecated") 
5: 'tidy.numeric' is deprecated.
See help("Deprecated") 
6: 'tidy.numeric' is deprecated.
See help("Deprecated") 
7: 'tidy.numeric' is deprecated.
See help("Deprecated") 

我没有找到任何有效的解决方案。有人可以帮忙吗?谢谢

This GitHub issue 与您的问题有关。您可以使用 pool.scalar() 函数解决此问题。

尝试 运行 你的模型直接在 mice 给出的输出上,而不是在 complete 函数

给出的输出上
library(psych)
# to create some missingness 
bfi[4,1] = NA_character_
bfi[6,2] = NA_character_
bfi[9,1] = NA_character_
bfi[7,2] = NA_character_
bfi[6,1] = NA_character_

# run mice
imput.bfi <- mice(bfi, m = 3)

# when "complete" function is used, "pool" function will not run
bfi.imp.dat=mice::complete(imput.bfi, action="long", inc = TRUE)
# run linear regression 
lm.bfi=with(bfi.imp.dat, lm(N1 ~ age))
# pool will not work here 
pool(lm.bfi)


# In this case the "pool" function will work properly
# run linear regression 
lm.bfi=with(imput.bfi, lm(N1 ~ age))
# pool results 
pool(lm.bfi)