szxship 发表于 2021-12-20 18:37 
问题 在这一行fit
好兄弟,非常非常感谢你,感谢您抽出了一些时间回答这个问题,但是这个结果还是有点不如人意,我按照你的代码试了一下,结果依旧是和上面一样,行不通,以下是错误代码,呜呜呜。
Error in lavParseModelString(model) : 
  lavaan ERROR: left hand side (lhs) of this formula:
    nihao[,1+19] ~ nihao[,1]+nihao[,1+1]
    contains either a reserved word (in R) or an illegal character: “nihao[,1”“19]”
    See ?reserved for a list of reserved words in R
    Please use a variable name that is not a reserved word in R
    and use only characters, digits, or the dot symbol.