我的数据有20%左右的缺失值,我想多重插补之后从插补的数据库中提取预测变量和结果变量进行降秩回归分析,如何从多重插补mice()后的数据库中提取变量?或者如何在插补的数据库中进行下一步降秩回归?with()貌似不适用,如何从插补完成的多个数据库中提取列作为新变量?
问题正文中不让出现rrr词汇,所以编码如下(部分编码)
imp <- mice(datarrr,m=5,seed=5,maxit = 5)
with(imp,rrr(imp$imp[1:2],imp$imp[3:4]))
Error in diag(1, full_rank) : invalid 'nrow' value (too large or NA)
In addition: Warning messages:
1: In min(dim(x)[2], dim(y)[2]) :
no non-missing arguments to min; returning Inf
2: In diag(1, full_rank) : NAs introduced by coercion to integer range