r - 在 R 中运行 mplusModeler 包时如何解决错误?
问题描述
我正在尝试使用他们在线提供的数据来复制最近一篇论文所做的分析。我编写了以下代码,该代码基于朋友发给我的内容,因此我认为它可以工作并且很容易,但我不断收到错误。
我的代码是:
rel_matrix = 0
reldata <- read.spss('C:/Users/name/Desktop/project/Original_religious_data.sav', to.data.frame = TRUE)
rreldata <- reldata[,c(14,17,19,31,32,33,34,47,48,49,50,51,52,53,54,55,56,59,60)]
lpa1_rel <- mplusObject(
TITLE = "1-Class Religious LPA;",
VARIABLE = "USEVARIABLES = god_belief-att_toward_religion;
CLASSES = c(1);",
ANALYSIS = "ESTIMATOR = MLR;
TYPE = MIXTURE;",
MODEL = "
%OVERALL%
god_belief-att_toward_religion;
[god_belief-att_toward_religion];
%c#1%
god_belief-att_toward_religion;
[god_belief-att_toward_religion];",
usevariables = c("god_belief", "belief_commitment", "certainty_super_belief",
"often_rel_practice", "attitude_rel_individuals",
"freq_assoc_rel_indiv", "att_toward_religion"),
rdata = rreldata)
lpa1_rel_fit = mplusModeler(lpa1_rel, "rel.dat", modelout = "rel.inp", run = 1L)
但是当我运行代码时,我收到以下错误消息:
Wrote model to: rel.inp
File(s) with md5 hash matching data found, using
rel_d83664d7fbf3db75066c75d1e6ee4266.dat
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
cannot open file 'C:\Users\name\AppData\Local\Temp\RtmpGQSiAY\file365c60ac5b16': No such file or directory
Error in file(out, "wt") : cannot open the connection
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
关于我所缺少的任何建议?
解决方案
推荐阅读
- excel - 如何让 VBA 复制一系列单元格,等待单元格计算并粘贴到另一个范围内?
- python - 在 Quiver 图中围绕箭头画圈。Python
- math - 使用海龟图形和画圆
- django - 无法在 django admin 中从 cloudinary 打开原始文件
- css - 自定义 CSS 滚动条在最右边的像素 0 上没有响应
- svn - SVN 无法连接到 localhost:目标机器主动拒绝它
- python - 如何通过 python click.version_option 装饰器的 Travis CI 测试?
- python - 如何访问字典中的项目键名然后找到值?(Python)
- c++ - 枚举所有设备路径
- java - Spark 告诉我特征列是错误的