0

I have run multiple imputations using R's Amelia package and would like to use the imputed dataset to analyse Mokken Scale Analysis. But mokken requires the object to be a data frame. I tried as.data.frame(x) and as.matrix(x) but it says that it cannot coerce class amelia into a data frame or matrix.

 australia93=as.data.frame(australia93)
 Error in as.data.frame.default(australia93) :
 cannot coerce class '"amelia"' into a data.frame

 coefH(australia93)
 Error in check.data(X) : Data are not matrix or data.frame
4

1 回答 1

1

该错误意味着 R 不知道如何将amelia对象转换为 a data.frame。即使您成功地将amelia对象放入 data.frame,Mokken 比例分析例程也可能希望其数据采用非常特定的形式。您需要查看amelia提供什么,以及 Mokken 需要什么,并提供它们之间的翻译。

如果没有更多信息(尤其是可重现的示例),很难为您提供更多帮助。

于 2013-02-26T12:18:35.723 回答