Error Message in lavaan

359 views
Skip to first unread message

mirijam.l...@arcor.de

unread,
Sep 14, 2022, 7:21:49 AM9/14/22
to lavaan
Hello,
I am trying to calculate a structural equation model. However, I get the following error messages:
"Warning messages:
  1: In lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats,  :
                         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.
                       2: In lav_test_satorra_bentler(lavobject = NULL, lavsamplestats =        lavsamplestats,  : lavaan WARNING: could not invert information matrix needed for robust test statistic"

I don't know if it is important, but all items with AW represent proportional scores.
My model looks like follows:

Strukturmodell <- '
  ##Faktor loading
  negaff =~ PI01_01 + PI04_19 + PI01_07 + PI03_25 + PI04_13 + PI03_31
  versch =~ PI01_04 + PI04_22 + PI01_10 + PI03_28 + PI04_16 + PI03_34
  antago =~ PI01_02 + PI04_20 + PI01_08 + PI03_26 + PI04_14 + PI03_32
  disin =~ PI01_03 + PI04_21 + PI01_09 + PI03_27 + PI04_15 + PI03_33
  anan =~ PI01_06 + PI04_18  + PI01_12 + PI04_24 + PI03_30 + PI03_36
  psycho =~ PI01_05 + PI04_23 + PI01_11 + PI03_29 + PI04_17 + PI03_35
  Reif =~ AW_D21_affiliation + AW_D22_altruisum + AW_D23_anticipation + AW_D24_humor +
          AW_D25_self_assertion + AW_D26_self_observation + AW_D27_sublimation +
          AW_D28_suppression
  HemmVer =~ AW_D7_autistic_fantasy + AW_D10_denial + AW_L5_neurotic + AW_D20_isolation_affects +
        AW_D19_intellectualization +  AW_D18_undoing + AW_D17_displacement +
        AW_D16_reaction_formation + AW_D15_dissociation1 + AW_D15_dissociation2 + AW_D14_repression
  Unreif =~ AW_D8_projection + AW_D9_rationalization +  AW_D12_idealization + AW_D13_devaluation +
        AW_D4_splitting_object_image + AW_D5_splitting_self_image + AW_D6_projective_identification +
        AW_D1_acting_out + AW_D2_help_rejecting_complaining + AW_D3_passive_aggression1 +
        AW_D3_passive_aggression2
 ##covariances
   Reif ~~ HemmVer
   Reif ~~ Unreif
   Reif ~~ negaff
   Reif ~~ versch
   Reif ~~ antago
   Reif ~~ disin
   Reif ~~ anan
   Reif ~~psycho
   HemmVer ~~ Unreif
   HemmVer ~~ negaff
   HemmVer ~~ versch
   HemmVer ~~ antago
   HemmVer ~~ disin
   HemmVer ~~ anan
   HemmVer ~~psycho
   Unreif ~~ Unreif
   Unreif ~~ negaff
   Unreif ~~ versch
   Unreif ~~ antago
   Unreif ~~ disin
   Unreif ~~ anan
   Unreif ~~ psycho
   negaff ~~  versch
   negaff ~~  antago
   negaff ~~  disin
   negaff ~~  anan
   negaff ~~  psycho
   versch ~~ antago
   versch ~~ disin
   versch ~~ anan
   versch ~~ psycho
   antago ~~ disin
   antago ~~ anan
   antago ~~ psycho
   disin ~~ anan
   disin ~~ psycho
   anan ~~ psycho
'
model_fit2 <- sem(data=df_re, model = strukturmodell, meanstructure = TRUE, estimator = "WLSMV", ordered = TRUE)

summary(model_fit2, fit.measures = TRUE, rsquare = TRUE)

I would be very grateful if you could help me further.


Terrence Jorgensen

unread,
Sep 14, 2022, 8:29:11 AM9/14/22
to lavaan
Your model is huge.  What is your sample size?  DWLS stabilizes around N=500 for even smaller SEMs, e.g., including only your first 2-3 factors.  How many response categories do your indicators have?

FYI, the cfa() and sem() functions automatically estimate exogenous factor covariances (see auto.cov.lv.x= argument in ?lavOptions), so you don't need all those lines of model syntax.

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

mirijam.l...@arcor.de

unread,
Sep 14, 2022, 9:29:33 AM9/14/22
to lavaan
Hello, thanks for your message.
My N=644. The PID variables have 4 response categories, the AW have 5 response categories.
Do you have any idea how I could deal with the large number of factors?
Thanks for your help so far.

mirijam.l...@arcor.de

unread,
Sep 15, 2022, 7:07:55 AM9/15/22
to lavaan
I'm sorry I made a wrong statement. Because of the proportional scores, the AW items can take on any value between 0 and 100.

Terrence Jorgensen

unread,
Sep 16, 2022, 7:37:15 AM9/16/22
to lavaan
AW items can take on any value between 0 and 100

By setting ordered=TRUE, you are telling lavaan that ALL indicators are ordinal, but only the PID items are.  If you explicitly specify the PID variable names for the ordered= argument, is there still an issue?

Or perhaps there are still only 5 specific values for AW items, even if those values are between 0 and 100?  Regardless, I would still try treating AW items as continuous (using estimator="MLR") to see if that helps.  
 
Do you have any idea how I could deal with the large number of factors?

You could parcel pairs of PID indicators to make them more continuous (the mean of two 4-category indicators yields 7 unique values).  But parceling without a good theory (e.g., subscales measuring different facets/dimensions of a construct) is rather arbitrary and adds noise, so consider the semTools::parcelAllocation() function (see references on the help page, and examples to see how to treat the random allocations as multiple imputations and obtain pooled results).
Reply all
Reply to author
Forward
0 new messages