Search code examples
rr-lavaanstructural-equation-model

SEM with lavaan in R, problems specifying model with correlated subscales. WARNING: Could not compute standard errors


I am currently working on running a SEM analysis in Lavaan and I am running into a few problems. Before running the full sem, I intended to run a CFA to replicate the psychometric testing done with this measure I am using. This measure has 24 items, which make up 5 subscales (latent variables), which in turn load onto a total "higher-order" factor. I try to estimate this model in two different ways: (1) A five-factor model (without a higher order factor) in which all 5 subscales are allowed to correlate and (2) a higher-order model with a TOTAL latent variable made up of those 5 suscales.

The first model has five correlated latents (FNR, FOB...FAA) factors, with variance fixed to 1. This model converges without errors and fits the data. The second model also works, as long as I don't specify that the subscales (FNR, FOB..) that make up the FTOTAL latent variable are correlated. However, if I specified that these subscales are correlated (#Residual correlations part), the model still runs but gives me the error "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." If I remove the residuals correlation from Model 2, the model runs without error. The R code for both is the following:


Model1 <- "
  #Measurements model
  FNR =~ FNR1 + FNR2 + FNR3 +FNR4 +FNR5
  
  FOB =~ FOB1 + FOB2 +FOB3 +FOB4
  
  FDS =~ FDS1 +FDS2 +FDS3 + FDS4 + FDS5
  
  FNJ =~ FNJ1 + FNJ2 + FNJ3 +FNJ4 + FNJ5
  
  FAA =~ FAA1 + FAA2 +FAA3 + FAA4 +FAA5
  

  #Residual correlations
 FAA ~~ FNJ + FOB + FDS + FNR
 FNR ~~ FNJ + FOB+ FDS
 FNJ ~~ FOB + FDS
 FOB ~~ FDS 

"
fit5factor <- sem(Model1, data=SEMDATA, std.lv=TRUE)


Model2 <- "
#Measurements model
  FNR =~ FNR1 + FNR2 + FNR3 +FNR4 +FNR5
  
  FOB =~ FOB1 + FOB2 +FOB3 +FOB4
  
  FDS =~ FDS1 +FDS2 +FDS3 + FDS4 + FDS5
  
  FNJ =~ FNJ1 + FNJ2 + FNJ3 +FNJ4 + FNJ5
  
  FAA =~ FAA1 + FAA2 +FAA3 + FAA4 +FAA5
  

  FTOTAL =~ FNR + FOB + FDS + FNJ+ FAA 
 

#Residual correlations
 FAA ~~ FNJ + FOB + FDS + FNR
 FNR ~~ FNJ + FOB+ FDS
 FNJ ~~ FOB + FDS
 FOB ~~ FDS 
"

fitTotal <- sem(Model2, data=SEMDATA, std.lv=TRUE)

This is my first time using SEM and I am not sure what I am doing wrong. Is it not appropriate to specify that these subscales that make up the FTOTAL latent variable are allowed to correlate? I understood from the literature that this is how the 2nd model was supposed to be specified (with the Five factors correlated), given that in the first model the five facets are correlated. However, maybe that is not the case and I should be running model two without the correlations, but I would like to learn the justification for that, and why this is not appropriate.

Thank you all in advance for the help.


Solution

  • You do not need to specify the correlations among first-order factors. The default options of lavaan will correlate them. If do not want to correlate them you can use the orthogonal=T inside the cfa() function.

    
    Model1 <- "
      #Measurements model
      FNR =~ FNR1 + FNR2 + FNR3 +FNR4 +FNR5
      
      FOB =~ FOB1 + FOB2 +FOB3 +FOB4
      
      FDS =~ FDS1 +FDS2 +FDS3 + FDS4 + FDS5
      
      FNJ =~ FNJ1 + FNJ2 + FNJ3 +FNJ4 + FNJ5
      
      FAA =~ FAA1 + FAA2 +FAA3 + FAA4 +FAA5
    "
    fit5factor <- sem(Model1, data=SEMDATA, std.lv=TRUE)
    

    Regarding a hierarchical structure, you do not have correlations among first-order factors, since the same latent (i.e. second-order) loads on them:

    Model2 <- "
    #Measurements model
      FNR =~ FNR1 + FNR2 + FNR3 +FNR4 +FNR5
      
      FOB =~ FOB1 + FOB2 +FOB3 +FOB4
      
      FDS =~ FDS1 +FDS2 +FDS3 + FDS4 + FDS5
      
      FNJ =~ FNJ1 + FNJ2 + FNJ3 +FNJ4 + FNJ5
      
      FAA =~ FAA1 + FAA2 +FAA3 + FAA4 +FAA5
      
      FTOTAL =~ FNR + FOB + FDS + FNJ+ FAA 
    "
    
    fitTotal <- sem(Model2, data=SEMDATA, std.lv=TRUE)
    

    If it solves your problem mark it as solved.