我可以在分段扫描电镜中使用与 psem 的交互项吗?

问题描述

我正在尝试在piecewiseSEM包中使用与psem交互的术语,但出现以下错误

名称错误(B)

 lme(response1 ~ predictor1 * predictor2,data),lme(response2 ~ predictor1 * predictor2,...)```

lme is in the nlme package

predictor1 is an integer of 7 levels
predictor2 is a factor of 2 levels

The model alone runs fine outside of psem,though. I Could not find a reference as to why interaction terms will not work in the function psem.

I appreciate any insights on this. Thanks!

解决方法

更新:

此 SEM 仅在 predictor2 为整数时才有效