如何在Stata命令中处理polychoric-to-sem工作中的错误?

时间:2013-06-11 18:25:03

标签: stata

我正在做多元化到sem的工作。我从我的代码中收到错误消息。

执行这些命令时

forvalues i=1/`: word count `thevars' ' {
forvalues j=1/`i' {
local setcor `setcor' `=polychR[`i',`j']'
 }
if `i' < `: word count `thevars' ' local setcor `setcor' \
 }
local N = _N
来自Stata的

错误消息

program error:  matching close brace not found
program error:  matching close brace not found

接下来,我尝试了ssd命令,如

ssd init `thevars', clear

错误消息是:

no; data in memory would be lost

我甚至在保存现有数据后尝试过,但错误信息仍然没有结果。

我在这两个步骤中出错了?

1 个答案:

答案 0 :(得分:0)

这篇文章有几个问题,因为你没有解释你想要做什么 或者您正在使用的本地宏或矩阵中的内容。

该行

 if `i' < `: word count `thevars' ' local setcor `setcor' \

看起来毫无意义,也是非法的。反斜杠是非法的,可能导致下一个括号}被忽略。没有反斜杠,这条线是有道理的,但它毫无意义。你最好告诉我们你想做什么。猜测,你是从某个地方复制代码而不是自己编写代码,所以请准确提供原文的副本以及对目标的解释。