0

I am trying to fit a measurement model with some latent variables as exonegous variables and a non-latent endogenous variable. Then I use two nominal variables as controls, gender (SPOL) and entrepreneurial family background (DRUZ_PODJ). The values in 'SPOL' are 'female' and 'male', and in 'DRUZ_PODJ' they are 'non_ent_fam' and _'ent_fam'. Both are class 'factor'. Here is the code I am using:

m_whole_c<-'
      SPOT=~SPOT1+SPOT2+SPOT3+SPOT4
      MOTIV=~MOTIV1+MOTIV2+MOTIV3+MOTIV4+MOTIV5
      WORK=~WORK1+WORK2+WORK3
      EC=~1*SPOT+1*MOTIV+1*WORK
      EC~~EC
      
      EAg=~EA1+EA3+EA4+EA5
      EAg~~EAg

      ESEg=~ESE1+ESE2+ESE3
      ESEg~~ESEg
      
      EA_2=~1*EA2
      EA_2~~EA_2
      
      Spol=~SPOL
      Druz_podj=~DRUZ_PODJ
      '


whole_m<- cfa(m_whole_c, data = df1)
summary(whole_m, fit.measures = T, standardized = T)

When I run either the cfa() or sem() functions, I get this message:

Warning: 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.Warning: lavaan WARNING: could not invert information matrix needed for robust test statistic
Warning: lavaan WARNING: covariance matrix of latent variables
            is not positive definite;
            use lavInspect(fit, "cov.lv") to investigate.

What am I doing wrong? Would it be better to just leave SPOL and DRUZ_PODJ as dichtonomous variables with numerical values 0 and 1, and 1 and 2, respectively? I think that would cut it?

If I remove SPOL and DRUZ_PODJ from the model, it works ok.

I hope someone can help me. BTW, I have checked other answers and found none that would answer my problem. Thanks!

  • 1
    If SPOL and DRUZ_PODJ are control variables, in the structural model to be tested, they are exogenous variables and so being dichotomous is fine. However, in the measurement model, with "Spol=~SPOL" and "Druz_podj=~DRUZ_PODJ", they are not exogenous variables, but are dichotomous indicators of latent factors. How about dropping them in the measurement model, and adding them back in the structural model? If these lines are added to make the two models comparable, then you will need to keep these two lines but SPOL and DRUZ_PODJ are also not exogenous variables in the structural model. – sfcheung May 30 '23 at 03:44
  • Thank you very much. That makes sense. I will try and let you know. – Janez Gorenc May 31 '23 at 15:48

0 Answers0