Received this error. Can anyoe help?
> model <- 'executive =~ dep4 + cog9 + dep47 + dep20
+ > language =~ cog13 + cog23 + cog8 + cog16 + cog32
+ > memory =~ cog20 + cog17 + cog6 + cog22
+ > perceptual =~ cog18 + cog21 + cog10 + cog26
+ > social =~ lie1 + cog27 + anx3 + par15 + psy18 + psy23 + psy17 + lie8 + psy28 '
> fit <- cfa(CIS.model, data=CIS41)
Error in lavaan::lavaan(model = CIS.model, data = CIS41, model.type = "cfa", :
object 'CIS.model' not found
> fit <- cfa(model, data=CIS41)
Error in lavParseModelString(model) :
lavaan ERROR: left hand side (lhs) of this formula:
>language =~ cog13+cog23+cog8+cog16+cog32
contains either a reserved word (in R) or an illegal character: “>language”
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.