Lavaan warning

244 views
Skip to first unread message

Eliseo Fica

unread,
Nov 23, 2021, 2:45:01 PM11/23/21
to lavaan
Hi community,

I´m fitting a model and a I get the following warning message:

Warning message:

In lav_object_post_check(object) :

  lavaan WARNING: the covariance matrix of the residuals of the observed

                variables (theta) is not positive definite;

                use lavInspect(fit, "theta") to investigate.

 

 

This is the model:

MOD3 <- '

# Measurement model

illegality =~ lvl_insti + mkt_chain

macro =~ vulnera + inequa + pov_ratio + gdp_grth + grth_00_20

institution =~ crpt_agents + gov_ind + gdp_grth

perception =~ inj_perc + mtv_perp

 

# Regressions

illegality ~ macro

illegality ~ institution

illegality ~ perception

illegality ~ pov_perp + cult_root + nat_cap

pov_perp ~ macro

 

# Correlations

gov_ind ~~ vulnera

gov_ind ~~ inequa

gov_ind ~~ pov_ratio

gov_ind ~~ gdp_grth

gov_ind ~~ grth_00_20

vulnera ~~ gdp_grth

pov_ratio ~~ gdp_grth

inequa ~~ crpt_agents

lvl_insti ~~ inj_perc

vulnera ~~ pov_ratio

crpt_agents ~~ inj_perc

lvl_insti ~~ mtv_perp

macro ~~ nat_cap

'

 The inspection 

            lvl_ns mkt_ch vulner inequa pov_rt gdp_gr g_00_2 crpt_g gov_nd inj_pr mtv_pr pv_prp clt_rt nat_cp

lvl_insti    0.337                                                                                          

mkt_chain    0.000  0.650                                                                                   

vulnera      0.000  0.000  0.427                                                                            

inequa       0.000  0.000  0.000  0.322                                                                      

pov_ratio    0.000  0.000 -0.186  0.000  0.592                                                              

gdp_grth     0.000  0.000  0.182  0.000 -0.373  0.842                                                       

grth_00_20   0.000  0.000  0.000  0.000  0.000  0.000  0.425                                                

crpt_agents  0.000  0.000  0.000 -0.055  0.000  0.000  0.000  0.833                                         

gov_ind      0.000  0.000 -0.494 -0.428 -0.252 -0.031 -0.297  0.000  0.755                                  

inj_perc     0.264  0.000  0.000  0.000  0.000  0.000  0.000 -0.214  0.000  0.880                           

mtv_perp     0.251  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.707                     

pov_perp     0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.964             

cult_root    0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  1.000      

nat_cap      0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  1.000

 

 

 

And the outcome of the model:

lavaan 0.6-7 ended normally after 78 iterations

 

  Estimator                                       DWLS

  Optimization method                           NLMINB

  Number of free parameters                         49

                                                     

  Number of observations                           190

                                                     

Model Test User Model:

                                              Standard      Robust

  Test Statistic                                54.654      71.532

  Degrees of freedom                                56          56

  P-value (Chi-square)                           0.526       0.079

  Scaling correction factor                                  0.990

  Shift parameter                                           16.350

       simple second-order correction                            

 

Model Test Baseline Model:

 

  Test statistic                               966.383     565.569

  Degrees of freedom                                91          91

  P-value                                        0.000       0.000

  Scaling correction factor                                  1.845

 

User Model versus Baseline Model:

 

  Comparative Fit Index (CFI)                    1.000       0.967

  Tucker-Lewis Index (TLI)                       1.002       0.947

                                                                 

  Robust Comparative Fit Index (CFI)                            NA

  Robust Tucker-Lewis Index (TLI)                               NA

 

Root Mean Square Error of Approximation:

 

  RMSEA                                          0.000       0.038

  90 Percent confidence interval - lower         0.000       0.000

  90 Percent confidence interval - upper         0.043       0.063

  P-value RMSEA <= 0.05                          0.981       0.763

                                                                 

  Robust RMSEA                                                  NA

  90 Percent confidence interval - lower                     0.000

  90 Percent confidence interval - upper                        NA

 

Standardized Root Mean Square Residual:

 

  SRMR                                           0.052       0.052

 

Parameter Estimates:

 

  Standard errors                           Robust.sem

  Information                                 Expected

  Information saturated (h1) model        Unstructured

 

Latent Variables:

                   Estimate  Std.Err  z-value  P(>|z|)

  illegality =~                                      

    lvl_insti         1.000                          

    mkt_chain         0.727    0.132    5.486    0.000

  macro =~                                           

    vulnera           1.000                          

    inequa            1.088    0.101   10.781    0.000

    pov_ratio         0.844    0.113    7.452    0.000

    gdp_grth         -0.026    0.162   -0.158    0.874

    grth_00_20        1.002    0.110    9.145    0.000

  institution =~                                     

    crpt_agents       1.000                          

    gov_ind           1.212    0.357    3.397    0.001

    gdp_grth         -0.995    0.367   -2.713    0.007

  perception =~                                      

    inj_perc          1.000                          

    mtv_perp          1.563    0.813    1.923    0.054

 

Regressions:

                   Estimate  Std.Err  z-value  P(>|z|)

  illegality ~                                       

    macro            -0.365    0.183   -1.999    0.046

    institution      -1.315    0.746   -1.764    0.078

    perception       -1.036    1.055   -0.982    0.326

    pov_perp          0.178    0.062    2.877    0.004

    cult_root         0.287    0.075    3.811    0.000

    nat_cap           0.177    0.082    2.158    0.031

  pov_perp ~                                         

    macro            -0.250    0.099   -2.517    0.012

 

Covariances:

                   Estimate  Std.Err  z-value  P(>|z|)

 .vulnera ~~                                         

   .gov_ind          -0.494    0.092   -5.377    0.000

 .inequa ~~                                          

   .gov_ind          -0.428    0.101   -4.253    0.000

 .pov_ratio ~~                                       

   .gov_ind          -0.252    0.092   -2.743    0.006

 .gdp_grth ~~                                        

   .gov_ind          -0.031    0.079   -0.398    0.690

 .grth_00_20 ~~                                      

   .gov_ind          -0.297    0.095   -3.120    0.002

 .vulnera ~~                                         

   .gdp_grth          0.182    0.051    3.565    0.000

 .pov_ratio ~~                                        

   .gdp_grth         -0.373    0.054   -6.955    0.000

 .inequa ~~                                          

   .crpt_agents      -0.055    0.048   -1.145    0.252

 .lvl_insti ~~                                       

   .inj_perc          0.264    0.082    3.219    0.001

 .vulnera ~~                                         

   .pov_ratio        -0.186    0.058   -3.205    0.001

 .crpt_agents ~~                                     

   .inj_perc         -0.214    0.070   -3.080    0.002

 .lvl_insti ~~                                       

   .mtv_perp          0.251    0.091    2.748    0.006

  macro ~~                                           

    nat_cap           0.169    0.056    3.009    0.003

    institution      -0.151    0.051   -2.939    0.003

    perception       -0.091    0.051   -1.788    0.074

  institution ~~                                     

    perception        0.083    0.046    1.807    0.071

 

Variances:

                   Estimate  Std.Err  z-value  P(>|z|)

   .lvl_insti         0.337    0.146    2.308    0.021

   .mkt_chain         0.650    0.088    7.359    0.000

   .vulnera           0.427    0.081    5.252    0.000

   .inequa            0.322    0.064    5.040    0.000

   .pov_ratio         0.592    0.060    9.811    0.000

   .gdp_grth          0.842    0.148    5.696    0.000

   .grth_00_20        0.425    0.078    5.414    0.000

   .crpt_agents       0.833    0.096    8.697    0.000

   .gov_ind           0.755    0.115    6.562    0.000

   .inj_perc          0.880    0.098    8.964    0.000

   .mtv_perp          0.707    0.218    3.237    0.001

   .pov_perp          0.964    0.114    8.428    0.000

    nat_cap           1.000    0.089   11.200    0.000

   .illegality        0.044    0.175    0.249    0.803

    macro             0.573    0.093    6.149    0.000

    institution       0.167    0.065    2.580    0.010

    perception        0.120    0.078    1.538    0.124

    cult_root         1.000    0.043   23.499    0.000

 

What do you think that is the problem here? I hope you can help me.

Thanks a lot. 

Edward Rigdon

unread,
Nov 23, 2021, 3:46:41 PM11/23/21
to lav...@googlegroups.com
     The warning is probably triggered by gov_ind. You can see in the lavInspect output that gov_ind has residual covariances with vulner and inequa that are higher than the residual variances of vulner and inequa, implying residual correlations outside the expected (-1, +1) range. I don't know why that is, but this seems like a strong rejection of the current model structure.
     You have gdp_grth loading on two factors, macro and institution, and the first loading is near 0. Your results might change if you delete the near-0 loading.
--Ed Rigdon

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/9cb9b72f-39c5-41a3-b878-a3ffff122f26n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages