SEM - problems with convergence, standardized parameter estimates and negative variances

705 views
Skip to first unread message

Pedro Miganda

unread,
Mar 31, 2018, 12:43:05 PM3/31/18
to lavaan
Dear group,

I've been trying to get the SEM bellow to converge for a while now and today I finally did it (and with a decent fit).
However, when I take a look at the summary, I can see that some of the estimates and standard errors are way off. Also, the model was not able to produce standardized estimates (std.lv and std.all) for some of my parameters.
I double checked the standard errors, scale and correlation structure of all of my variables and I could not find anything obvious that needs fixing, so here I am.
I would really appreciate any help I can get on this. These models (this one and the other ones I'm running) are a good chunk of my thesis and I can't get this one to work.
Model syntax, functions I ran and summary are copied bellow. I am also happy to share my data if it will help figuring out what is happening. 
 
This is the model:
  
model1 <- 
'#latent variables
soil =~ SandLOG + P.totalLOG + Al.cmol. + SB
climate =~ DroughtLOG + mapLOG
fire =~ FireLOG
#Regressions
soil ~ climate
fire ~ climate
Biome ~ climate + soil + fire
#covariances
SB ~~ P.totalLOG
SB ~~ FireLOG
'
In the model above, alll variables are continuous apart from Biome, which is categorical and has two levels.

- Running the following function generates the error message displayed bellow: fit.model1 <- lavaan::sem(model1, data=dat1,  fixed.x = F)

Warning messages:
1: In lav_object_post_check(object) :
  lavaan WARNING: some estimated ov variances are negative
2: In lav_object_post_check(object) :
  lavaan WARNING: some estimated lv variances are negative

- Getting the summary: summary(fit.savfor.BRA_new, fit.measures=TRUE, standardized=TRUE)  

lavaan (0.5-23.1097) converged normally after 408 iterations

  Number of observations                            66

  Estimator                                         ML
  Minimum Function Test Statistic               15.508
  Degrees of freedom                                15
  P-value (Chi-square)                           0.415

Model test baseline model:

  Minimum Function Test Statistic               79.879
  Degrees of freedom                                28
  P-value                                        0.000

User model versus baseline model:

  Comparative Fit Index (CFI)                    0.990
  Tucker-Lewis Index (TLI)                       0.982

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)                     NA
  Loglikelihood unrestricted model (H1)             NA

  Number of free parameters                         21
  Akaike (AIC)                                      NA
  Bayesian (BIC)                                    NA

Root Mean Square Error of Approximation:

  RMSEA                                          0.023
  90 Percent Confidence Interval          0.000  0.120
  P-value RMSEA <= 0.05                          0.580

Standardized Root Mean Square Residual:

  SRMR                                           0.091

Parameter Estimates:

  Information                                 Expected
  Standard Errors                             Standard

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  soil =~                                                               
    SandLOG           1.000                                 NaN      NaN
    P.totalLOG        2.350    1.272    1.847    0.065      NaN      NaN
    Al.cmol.          3.273    1.668    1.962    0.050      NaN      NaN
    SB                7.947    4.081    1.947    0.052      NaN      NaN
  climate =~                                                            
    DroughtLOG        1.000                               0.060    0.053
    mapLOG            0.219    0.158    1.381    0.167    0.013    0.064
  fire =~                                                               
    FireLOG           1.000                               1.074    1.000

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  soil ~                                                                
    climate           1.371    4.367    0.314    0.754      NaN      NaN
  fire ~                                                                
    climate           8.214   16.085    0.511    0.610    0.462    0.462
  Biome ~                                                               
    climate          27.362  100.461    0.272    0.785    1.651    3.403
    soil              3.928    9.173    0.428    0.668      NaN      NaN
    fire             -0.973    2.254   -0.432    0.666   -1.044   -2.153

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .P.totalLOG ~~                                                         
   .SB                0.966    0.554    1.743    0.081    0.966    0.366
 .SB ~~                                                                 
   .FireLOG          -0.675    0.380   -1.774    0.076   -0.675     -Inf

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .SandLOG           0.314    0.062    5.037    0.000    0.314    1.107
   .P.totalLOG        0.958    0.234    4.098    0.000    0.958    1.212
   .Al.cmol.          1.033    0.320    3.227    0.001    1.033    1.461
   .SB                7.267    2.029    3.581    0.000    7.267    1.359
   .DroughtLOG        1.292    0.225    5.749    0.000    1.292    0.997
   .mapLOG            0.042    0.007    5.743    0.000    0.042    0.996
   .FireLOG           0.000                               0.000    0.000
   .Biome            -2.280    9.770   -0.233    0.816   -2.280   -9.685
   .soil             -0.037    0.033   -1.141    0.254      NaN      NaN
    climate           0.004    0.014    0.251    0.801    1.000    1.000
   .fire              0.907    0.848    1.069    0.285    0.787    0.787


I was also given the following warning message:

Warning messages:
1: In sqrt(ETA2) : NaNs produced
2: In sqrt(ETA2) : NaNs produced
3: In sqrt(ETA2) : NaNs produced

Thank you for your time and attention.

Kind regards,

Pedro Miranda

Edward Rigdon

unread,
Mar 31, 2018, 4:12:11 PM3/31/18
to lav...@googlegroups.com
Your second common factor, Climate, has only 2 indicators. Both loadings must be strong for the model to be identified, without additional constraints. The unstandardized loadings are 1.00 (fixed) and 0.22. The p-value on the second loading is not significant at alpha = .05. But it is also not 0 exactly. Your sample size is small. The model is " nearly not identified," as Karl Joreskog used the phrase. Like a satellite in orbit, it spins around and around the black hole if non-identification, never escapinmg but never failing outright. To establish identification, you eitehr need more constraints or more indicators on the second factor.

--
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+unsubscribe@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.

kma...@aol.com

unread,
Apr 1, 2018, 9:49:26 AM4/1/18
to lavaan
Pedro,
To elaborate a little, one option would be to choose an a priori sequence of plausible unique variances and to do a sensitivity analysis by running the model with the unique variances fixed at each level, at least for the problematic factor.  A second option might be to use blavaan and encode some of your background knowledge as prior distributions on certain parameters.  A third option is to drop the problematic factor and include its indicators as separate variables in the model.  You could combine option 1 and 3.

Keith
------------------------
Keith A. Markus
John Jay College of Criminal Justice, CUNY
http://jjcweb.jjay.cuny.edu/kmarkus
Frontiers of Test Validity Theory: Measurement, Causation and Meaning.
http://www.routledge.com/books/details/9781841692203/

Pedro Miganda

unread,
Apr 2, 2018, 2:51:15 PM4/2/18
to lav...@googlegroups.com
Thank you for this, Edward. I am now adding more indicators and indicators to this model. Will post an update soon.

--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/1jL1lKVfv3E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+unsubscribe@googlegroups.com.

Pedro Miganda

unread,
Apr 2, 2018, 2:55:47 PM4/2/18
to lav...@googlegroups.com
Thank you for your input, Keith. I think combining options one and three is going to be quicker, but I will try to use blavaan in the future (I download it, but it is not compatible with R 3.4.4, which is the newest version of R). I'll post an update on this model soon. 

--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/1jL1lKVfv3E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages