Hi,
I am encountering difficulties with model estimation in lavaan when including an ordered factor variable in my analysis. I have a structural equation model where the ordered factor variable "Conc" represents concentration with four levels: 0, 2, 20, and 200. When the Conc variable is a numeric and not a factor, the model converges smoothly but after switching it it just gives a lot of warnings.
Here is a simplified version of my model specification:
#Aquatic communitites
Detri ~ Conc
Herbivores ~ Conc
Predators ~ Conc
Macrozoo ~ Conc
Microzoo ~ Conc
fito ~ Conc
#Processes
periph ~ Conc
decomp ~ Conc
mf ~ Conc
#Biota interdependencies
Detri ~~ Herbivores
Detri ~~ Microzoo
Detri ~~ Predators
Detri ~~ Macrozoo
Detri ~~ fito
Herbivores ~~ Predators
Herbivores ~~ Macrozoo
Herbivores ~~ Microzoo
Herbivores ~~ fito
Predators ~~ Macrozoo
Predators ~~ Microzoo
Predators ~~ fito
Macrozoo ~~ fito
Macrozoo ~~ Microzoo
Microzoo ~~ fito
#Functional interdependencies
mf ~~ periph
mf ~~ fito
mf ~~ Herbivores
periph ~~ Herbivores
periph ~~ fito
Upon attempting model estimation, I encountered the following warning messages:
Warning: lavaan WARNING: exogenous variable(s) declared as ordered in data: Conc
Warning: lavaan WARNING: Model estimation FAILED! Returning starting values.
Warning: lavaan WARNING: parameter table does not contain intercepts for one or more variables: [Detri Herbivores Predators Macrozoo Microzoo fito periph decomp mf]
Warning: lavaan WARNING: estimation of the baseline model failed.
I have already recoded the "Conc" variable as an ordered factor with the correct levels (0, 2, 20, and 200) using the factor() function in R.
Could you please provide guidance on how to properly handle ordered factor variables in lavaan? Additionally, any insights into resolving the warning messages related to the estimation failure would be greatly appreciated.
Thank you for your assistance.
Sincerely,
Pablo
difficulties with model estimation in lavaan when including an ordered factor variable "Conc" in my analysis
Warning: lavaan WARNING: exogenous variable(s) declared as ordered in data: Conc
Could you please provide guidance on how to properly handle ordered factor variables in lavaan?