Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试lavaan使用语法术语运算符:(它适用于双向交互)来估计 R 中具有三向交互的模型。似乎lavaan忽略了三向交互。
lavaan
:
要重现该问题,可以使用
library(lavaan) f1<-"y~x1+x2+x3+x1:x2+x2:x3+x1:x2:x3" lavParseModelString(f1) $rhs [1] "x1" "x2" "x3" "x1:x2" "x2:x3"
我错过了什么吗?
我只使用过几次 Lavaan,但您是否尝试过创建交互项并将其插入模型中?我假设这些是观察到的变量,因为“:”适用于观察到的但不是潜在的变量。IE,
interaction <- x1*x2*x3 f1 <- "y ~ x1 + x2 + x3 + x1:x2 + x2:x3 + interaction"
我不知道为什么“:”不适用于三向交互。另外,祝你好运解释你的三向互动!