Tirgit / missCompare

missCompare R package - intuitive missing data imputation framework
Other
39 stars 5 forks source link

I don't know how to deal with this problem. #2

Closed Hanqingpeng closed 3 years ago

Hanqingpeng commented 5 years ago

[1] "ITERATION 1 OF TOTAL 50 - IN PROGRESS" 75% of observations (with at least one missing datapoint) covered by setting min_PDM to 1.3 75% of observations (with at least one missing datapoint) covered by setting min_PDM to 1.3 75% of observations (with at least one missing datapoint) covered by setting min_PDM to 1.3 [1] "random replacement imputation - in progress" [1] "Median imputation - in progress" [1] "Mean imputation - in progress" [1] "missMDA regularized imputation - in progress" [1] "missMDA EM imputation - in progress" [1] "pcaMethods PPCA imputation - in progress" [1] "pcaMethods svdImpute imputation - in progress" [1] "pcaMethods BPCA imputation - in progress" [1] "pcaMethods NIPALS imputation - in progress" [1] "pcaMethods NLPCA imputation - in progress" [1] "mice mixed imputation - in progress" [1] "mi imputation - in progress" [1] "Amelia II imputation - in progress" [1] "missForest imputation - in progress" [1] "Hmisc aregImpute imputation - in progress" Error in rcspline.eval(z, knots = parms, nk = nk, inclx = TRUE) : In addition: There were 22 warnings (use warnings() to see them)

warnings() 警告信息: 1: In stats::ks.test(orig_MCAR, imp_MCAR, exact = TRUE) : cannot compute exact p-value with ties 2: In stats::ks.test(orig_MAR, imp_MAR, exact = TRUE) : cannot compute exact p-value with ties 3: In stats::ks.test(orig_MNAR, imp_MNAR, exact = TRUE) : cannot compute exact p-value with ties 4: In stats::ks.test(orig_MCAR, imp_MCAR, exact = TRUE) : cannot compute exact p-value with ties 5: In stats::ks.test(orig_MAR, imp_MAR, exact = TRUE) : cannot compute exact p-value with ties 6: In stats::ks.test(orig_MNAR, imp_MNAR, exact = TRUE) : cannot compute exact p-value with ties 7: In stats::ks.test(orig_MCAR, imp_MCAR, exact = TRUE) : cannot compute exact p-value with ties 8: In stats::ks.test(orig_MAR, imp_MAR, exact = TRUE) : cannot compute exact p-value with ties 9: In stats::ks.test(orig_MNAR, imp_MNAR, exact = TRUE) : cannot compute exact p-value with ties 10: In stats::ks.test(orig_MCAR, imp_MCAR, exact = TRUE) : cannot compute exact p-value with ties 11: In stats::ks.test(orig_MAR, imp_MAR, exact = TRUE) : cannot compute exact p-value with ties 12: In stats::ks.test(orig_MNAR, imp_MNAR, exact = TRUE) : cannot compute exact p-value with ties 13: In stats::ks.test(orig_MCAR, imp_MCAR, exact = TRUE) : cannot compute exact p-value with ties 14: In stats::ks.test(orig_MAR, imp_MAR, exact = TRUE) : cannot compute exact p-value with ties 15: In stats::ks.test(orig_MNAR, imp_MNAR, exact = TRUE) : cannot compute exact p-value with ties 16: In stats::ks.test(orig_MCAR, imp_MCAR, exact = TRUE) : cannot compute exact p-value with ties 17: In stats::ks.test(orig_MAR, imp_MAR, exact = TRUE) : cannot compute exact p-value with ties 18: In stats::ks.test(orig_MNAR, imp_MNAR, exact = TRUE) : cannot compute exact p-value with ties 19: In amelia.prep(x = x, m = m, idvars = idvars, empri = empri, ... : You have a small number of observations, relative to the number, of variables in the imputation model. Consider removing some variables, or reducing the order of time polynomials to reduce the number of parameters. 20: In amelia.prep(x = x, m = m, idvars = idvars, empri = empri, ... : You have a small number of observations, relative to the number, of variables in the imputation model. Consider removing some variables, or reducing the order of time polynomials to reduce the number of parameters. 21: In amelia.prep(x = x, m = m, idvars = idvars, empri = empri, ... : You have a small number of observations, relative to the number, of variables in the imputation model. Consider removing some variables, or reducing the order of time polynomials to reduce the number of parameters. 22: In rcspline.eval(z, knots = parms, nk = nk, inclx = TRUE) : 3 knots requested with 5 unique values of x. knots set to 3 interior values.

Tirgit commented 5 years ago

Hi,

I am trying to troubleshoot, but it is tricky as you didn't provide a reproducible example (data + code). Which function are you using? _imputesimulated()? Seems like you have a small number of observations, so things can get tricky.

I searched for this problem and it is possible that the nk argument needs to be manually played with - currently, this is not possible in the missCompare framework, but will fix in the next version.

Meanwhile, I suggest you try various algorithms on your data using the function _imputedata() and then run post imputation diagnostics using _post_impdiag() .