Hi, I am Nicole. I am a novice in SEM and would like to solicit your ideas and inputs regarding the problems that I am currently encountering. I am using lavaan package in R in my analysis. I am studying the relationship of the different indicators of concrete sustainability for my Environmental as latent construct. So my data is as attached, it consists of 11 variables with only 10 observations (I am aware that the number of observations are way too few, even fewer than the number of variables and lavaan indicates warning for this as well, I just would like to ask as well if this is the cause of the major problem). I am getting an error in lavaan that "lavaan ERROR: sample covariance matrix is not positive definite". I have read articles and threads about the same problem but did not find anything that works for me. I have also tried, removing the variables with very high correlation (0.95 and greater) and run the analysis for different situations and I am encountering a lot of other errors and warnings such as,
1. lavaan WARNING: some observed variances are (at least) a factor 1000 times larger than others; use variable(fit) to investigate.
2. lavaan WARNING: could not compute standard errors! The information matrix could not be inverted. This may be a symptom that the model is not identified.
3. lavaan WARNING: some estimated ov variances are negative.
4. lavaan WARNING: not all elements of the gradient are (near) zero; the optimizer may not have found a local solution; use lavInspect(fit, "optim.gradient") to investigate.
5. lavaan WARNING: the variance-covariance matrix of the estimated parameters(vcov) does not appear to be positive definite! The smallest eigenvalue (= -1.840682e-07) is smaller than zero. This may be a symptom that the model is not identified.
6. lavaan WARNING: the optimizer warns that a solution has not been found.
Does this mean that my model is misspecified? What are the steps that can be done for this? The below is my syntax.
#load packages
library(lavaan)
library(readxl)
TRIAL1
#Retrieve excel RAW data (En indicators only) - data saved as 'Trial1' and name it as trial1
trial1 <- read_excel(file.choose())
MODEL1
#Set-up the model (first level indicators only) and name it as model
model <- '
#latent variables: Environment(En)
En =~ SCI2 + SCI3 + SCI4 + SCI5 + SCI6 + SCI7 + SCI8 + SCI28 + SCI29 + SCI30 + SCI31
'
MODEL2
#Set-up the model (first level indicators only) removing the highly correlated values (0.99 and above) and name it as model2
model2 <- '
#latent variables: Environment(En)
En =~ SCI2 + SCI3 + SCI5 + SCI6 + SCI8
'
MODEL3
#Set-up the model (first level indicators only) removing the highly correlated values (0.95 and above) and name it as model3
model3 <- '
#latent variables: Environment(En)
En =~ SCI2 + SCI3 + SCI5 + SCI8
'
#Fit the model and name it as fit1
fit1 <- cfa(model, data = trial1)
If there's any concept that I am missing and I did not fully understand, I am very happy to hear your feedback. Thank you so much in advance for all your help.
-Nicole