r - R 包“RSA”中的 Probit - 未识别?
问题描述
我在 R 中运行了一些响应面分析。我以前从未运行过这些二元结果;但是,根据“RSA”的包信息:响应变量必须定义为“有序”,并且 lavaan 估计器更改为“WLSMV”。没问题。
sui <- RSA(current ~ x1*x2, data = invar, ordered = "current", center = "pooled", missing = "listwise", control.variables = c("x3", "x4"), center.control.variables = T, estimator = "WLSMV")
但是,无论我做什么,我都会收到模型未识别的错误。我试过在有和没有控制变量的情况下运行它,改变估计器,改变我使用“有序”(例如,“有序=T”)的方式,没有骰子。我试过重新安装lavaan,并切换出结果变量。我什至尝试过运行它,就好像结果变量是连续的一样,而且效果很好——这似乎是关于尝试运行概率的事情。
Warning messages:
1: In lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, :
lavaan WARNING:
Could not compute standard errors! The information matrix could
not be inverted. This may be a symptom that the model is not
identified.
2: In lav_test_satorra_bentler(lavobject = NULL, lavsamplestats = lavsamplestats, :
lavaan WARNING: could not invert information matrix needed for robust test statistic
我也收到此错误:
Error in names(R2.p) <- "R2.p" :
'names' attribute [1] must be the same length as the vector [0]
如果我使用“ordered = names(current)”或“ordered = names(invar)”来尝试规避这一点,模型实际上会运行,我可以查看测试统计信息。然而,如果我调用summary() 或plot(),我会得到这个可爱的信息:
Error in names(SE) <- c("x", "y", "x2", "xy", "y2") :
attempt to set an attribute on NULL
解决方案
推荐阅读
- android - 共享首选项值更改时视图不更新
- python - 为每个 matplotlib 保存一个图形
- python - 无法在 Python 中导入 xgboost
- sql-server - T-SQL:创建触发器以将新列从一个表复制到另一个表并增加 no
- c - 如何从c中的文本文件创建多个函数来运行总计?
- bash - UNIX 创建一个模仿 rm 错误条件的函数?
- python - 如何修复 python pdb 工具中的“'gbk'编解码器无法解码字节”错误?
- .net - 对带有 COM-Visible 对象参数的 COM-Visible 方法调用无效的过程调用或参数
- rest - 如果资源不存在,HTTP PUT 是否应该创建它?
- linux - 文件内容到 Blob 字符串的转换