Structural Equation Modeling: Clarifications and Questions

1,271 views
Skip to first unread message

Nicole Alexis Vios

unread,
Mar 13, 2019, 7:36:40 PM3/13/19
to lavaan
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
Trial1.xlsx

Jeremy Miles

unread,
Mar 13, 2019, 7:41:28 PM3/13/19
to lav...@googlegroups.com
I see two issues.

1. lavaan WARNING: some observed variances are (at least) a factor 1000 times larger than others; use variable(fit) to investigate.

As it says, your variances are very different, this causes problems. Multiply  / divide your variable by a constant to make their variances more equa.. 

2. Most of the other errors. 

Your sample is (much) too small. Recommendations about minimum sample sizes vary, but you want at least 100. 

Jeremy



--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

Nicole Alexis Vios

unread,
Mar 13, 2019, 8:02:40 PM3/13/19
to lavaan
Thank you for your immediate response Jeremy. Do you have any suggestions for good reads for reference for sample size requirements?

Jeremy Miles

unread,
Mar 13, 2019, 8:24:03 PM3/13/19
to lav...@googlegroups.com

On Wed, 13 Mar 2019 at 17:02, Nicole Alexis Vios <nicole...@gmail.com> wrote:
Thank you for your immediate response Jeremy. Do you have any suggestions for good reads for reference for sample size requirements?

Reply all
Reply to author
Forward
0 new messages