Approaches to negative variance solutions

69 views
Skip to first unread message

Conal Monaghan

unread,
Jan 16, 2019, 2:25:36 AM1/16/19
to lavaan
Hi,
     I am looking for basic solutions to the negative variance problem. The model is a two-tier hierarchical model, comprising one higher order factor with three lower level factors. One factor, critical, has a negative variance issue (-88.070; see below) with a loading on 210.805. I was wondering what the problem solving strategy would be from here? Please find appropriate output below.

    I tried placing "Critical" first to force lavaan to constrain this to one. However, this exacerbated the issue ( Variances with critical placed first: Critical = -1132.998; minimising = 0.925; helpful =1.075; support =1133.969)

Cheers and thank you very much in advance, 
        Conal

########## Model definition #####################

Model6 <- 'Critical =~ Q3.1_9 + Q3.1_7 + Q3.1_8 + Q3.1_14 + Q3.1_15 + Q3.1_12 + Q3.1_6 + Q3.1_16 + Q3.1_11 + Q3.1_13 + Q3.1_10 # Critical items

                minimising =~ Q3.1_19 + Q3.1_18 + Q3.1_29 + Q3.1_35 + Q3.1_20 + Q3.1_17 + Q3.1_33 + Q3.1_27 + Q3.1_31 + Q3.1_36 + Q3.1_4 + Q3.1_28 + Q3.1_25 + Q3.1_30 + Q3.1_26 # minimising items

                helpful =~ Q4_17 + Q4_19 + Q4_13 + Q4_12 + Q4_18 + Q4_16 + Q4_15 + Q4_11 + Q4_10 + Q4_9 + Q4_3 + Q4_8 + Q4_4 + Q4_6 + Q4_2 # helpful items

               Support =~   helpful + minimising  + Critical   # higher-order factor definition

# error covariances #
Q4_16 ~~ Q4_15
Q3.1_27 ~~ Q3.1_28
Q3.1_7 ~~ Q3.1_8
Q3.1_19 ~~ Q3.1_18
Q3.1_31 ~~ Q3.1_28
Q3.1_35 ~~ Q3.1_36

'

> summary(cfa(Model6, data = Sample2, estimator="MLR"))

lavaan 0.6-3 did NOT end normally after 1665 iterations
** WARNING ** Estimates below are most likely unreliable

  Optimization method                           NLMINB
  Number of free parameters                         91

  Number of observations                           368

  Estimator                                               ML
  Model Fit Test Statistic                          NA
  Degrees of freedom                               NA
  P-value                                                   NA

Parameter Estimates:

  Information                                               Observed
  Observed information based on                Hessian
  Standard Errors                                        Robust.huber.white

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)
  Critical =~                                         
    Q3.1_9            1.000                           
    Q3.1_7            0.990       NA                  
    Q3.1_8            0.964       NA                  
    Q3.1_14           0.947       NA                  
    Q3.1_15           1.009       NA                  
    Q3.1_12           1.028       NA                  
    Q3.1_6            0.897       NA                  
    Q3.1_16           1.018       NA                  
    Q3.1_11           0.913       NA                  
    Q3.1_13           1.035       NA                  
    Q3.1_10           1.017       NA                  
  minimising =~                                       
    Q3.1_19           1.000                           
    Q3.1_18           0.918       NA                  
    Q3.1_29           0.794       NA                  
    Q3.1_35           0.788       NA                  
    Q3.1_20           0.993       NA                  
    Q3.1_17           0.880       NA                  
    Q3.1_33           0.871       NA                  
    Q3.1_27           0.938       NA                  
    Q3.1_31           0.864       NA                  
    Q3.1_36           0.769       NA                  
    Q3.1_4            0.810       NA                  
    Q3.1_28           0.899       NA                  
    Q3.1_25           0.930       NA                  
    Q3.1_30           0.827       NA                  
    Q3.1_26           0.794       NA                  
  helpful =~                                          
    Q4_17             1.000                           
    Q4_19             1.101       NA                  
    Q4_13             1.003       NA                  
    Q4_12             0.854       NA                  
    Q4_18             1.046       NA                  
    Q4_16             0.797       NA                  
    Q4_15             0.781       NA                  
    Q4_11             0.853       NA                  
    Q4_10             0.842       NA                  
    Q4_9              0.954       NA                  
    Q4_3              0.690       NA                  
    Q4_8              0.801       NA                  
    Q4_4              0.861       NA                  
    Q4_6              0.946       NA                  
    Q4_2              0.575       NA                  
  support =~                                          
    helpful              1.000                           
    minimising        1.320       NA                  
    Critical              210.805    NA                  

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)
 .Q4_16 ~~                                            
   .Q4_15             0.339       NA                  
 .Q3.1_27 ~~                                          
   .Q3.1_28           0.392       NA                  
 .Q3.1_7 ~~                                           
   .Q3.1_8            0.397       NA                  
 .Q3.1_19 ~~                                          
   .Q3.1_18           0.279       NA                  
 .Q3.1_31 ~~                                          
   .Q3.1_28           0.336       NA                  
 .Q3.1_35 ~~                                          
   .Q3.1_36           0.308       NA                  

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
   .Q3.1_9            0.696       NA                  
   .Q3.1_7            0.740       NA                  
   .Q3.1_8            0.786       NA                  
   .Q3.1_14           0.745       NA                  
   .Q3.1_15           0.681       NA                  
   .Q3.1_12           0.614       NA                  
   .Q3.1_6            0.741       NA                  
   .Q3.1_16           0.694       NA                  
   .Q3.1_11           0.776       NA                  
   .Q3.1_13           0.599       NA                  
   .Q3.1_10           0.797       NA                  
   .Q3.1_19           0.760       NA                  
   .Q3.1_18           0.698       NA                  
   .Q3.1_29           0.861       NA                  
   .Q3.1_35           0.830       NA                  
   .Q3.1_20           0.803       NA                  
   .Q3.1_17           0.707       NA                  
   .Q3.1_33           0.957       NA                  
   .Q3.1_27           0.955       NA                  
   .Q3.1_31           1.109       NA                  
   .Q3.1_36           0.981       NA                  
   .Q3.1_4            1.058       NA                  
   .Q3.1_28           1.015       NA                  
   .Q3.1_25           0.980       NA                  
   .Q3.1_30           0.937       NA                  
   .Q3.1_26           1.052       NA                  
   .Q4_17             0.524       NA                  
   .Q4_19             0.396       NA                  
   .Q4_13             0.491       NA                  
   .Q4_12             0.700       NA                  
   .Q4_18             0.480       NA                  
   .Q4_16             0.805       NA                  
   .Q4_15             0.721       NA                  
   .Q4_11             0.724       NA                  
   .Q4_10             0.710       NA                  
   .Q4_9              0.456       NA                  
   .Q4_3              0.676       NA                  
   .Q4_8              0.650       NA                  
   .Q4_4              0.636       NA                  
   .Q4_6              0.590       NA                  
   .Q4_2              0.651       NA                  
    Critical        -88.070       NA                  
    minimising      0.921       NA                  
    helpful           1.073       NA                  
    support           0.002       NA                  

Warning message:
In lavaan::lavaan(model = Model6, data = Sample2, estimator = "MLR",  :
  lavaan WARNING: the optimizer warns that a solution has NOT been found!

Gary Burns

unread,
Jan 16, 2019, 1:47:38 PM1/16/19
to lavaan
Tried to respond via email but it didn't work. Or I'm double posting. 

Hi Conal, 

I'm following this to see what others suggest as well. 

You could try to constrain the variance of critical latent variable to small negative value. In LISREL I would constrain to be greater than zero, but I haven't found that option in lavaan. So you could do something like: Critical~~.05*Critical

I've seen others post something like the below code, but it has been unsuccessful for me:
Critical~~x*Crtical
x > 0

However, these solutions don't address the underlying problem of why this is happening. 

Do you have these problems when you try to estimate the model without the error covariances? That would be my first step in trouble shooting this. Next I would constrain the second-order loadings to be equal and see how the model responded. 

Terrence Jorgensen

unread,
Jan 16, 2019, 6:23:28 PM1/16/19
to lavaan
One factor, critical, has a negative variance issue (-88.070; see below) with a loading on 210.805.

I would hesitate to conclude that.  Your model did not converge, so that is not a ML estimate, just the place where the optimizer gave up trying.  What does your factor covariance matrix look like in the first-order CFA (without a higher-order factor)?  I expect it could provide a clue as to why this model fails to converge.

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


Conal Monaghan

unread,
Jan 16, 2019, 7:53:51 PM1/16/19
to lavaan
Thank you both for the help. Without the higher-order factor, the model fits the data relatively well:     
               chisq                         df                     pvalue             cfi.robust                  srmr          rmsea.robust rmsea.ci.lower.robust rmsea.ci.upper.robust 
             1886.076               770.000                 0.000                 0.900                 0.069                 0.059                 0.055                         0.063 

I think you raise a good point, there is an issue with negative covar between two of the factors; minimising ~~  helpful =  -0.010 

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)
 .Q4_16 ~~                                            
   .Q4_15             0.339    0.061    5.568    0.000
 .Q3.1_27 ~~                                          
   .Q3.1_28           0.393    0.073    5.375    0.000
 .Q3.1_7 ~~                                           
   .Q3.1_8            0.397    0.058    6.858    0.000
 .Q3.1_19 ~~                                          
   .Q3.1_18           0.279    0.056    5.025    0.000
 .Q3.1_31 ~~                                          
   .Q3.1_28           0.336    0.070    4.809    0.000
 .Q3.1_35 ~~                                          
   .Q3.1_36           0.308    0.068    4.512    0.000
  Critical ~~                                         
    minimising        0.553    0.065    8.555    0.000
    helpful             0.415    0.065    6.386    0.000
  minimising ~~                                       
    helpful          -0.010    0.068   -0.148    0.882

Variances:
                        Estimate  Std.Err  z-value  P(>|z|)
   .Q3.1_9            0.696    0.065   10.780    0.000
   .Q3.1_7            0.740    0.064   11.517    0.000
   .Q3.1_8            0.786    0.063   12.462    0.000
   .Q3.1_14           0.745    0.068   11.028    0.000
   .Q3.1_15           0.681    0.059   11.625    0.000
   .Q3.1_12           0.614    0.057   10.773    0.000
   .Q3.1_6            0.741    0.054   13.817    0.000
   .Q3.1_16           0.694    0.062   11.129    0.000
   .Q3.1_11           0.776    0.065   11.894    0.000
   .Q3.1_13           0.599    0.056   10.668    0.000
   .Q3.1_10           0.797    0.076   10.431    0.000
   .Q3.1_19           0.760    0.075   10.179    0.000
   .Q3.1_18           0.697    0.070    9.975    0.000
   .Q3.1_29           0.860    0.073   11.822    0.000
   .Q3.1_35           0.830    0.078   10.665    0.000
   .Q3.1_20           0.803    0.084    9.575    0.000
   .Q3.1_17           0.707    0.064   10.993    0.000
   .Q3.1_33           0.957    0.086   11.107    0.000
   .Q3.1_27           0.955    0.096    9.938    0.000
   .Q3.1_31           1.109    0.098   11.360    0.000
   .Q3.1_36           0.981    0.082   12.003    0.000
   .Q3.1_4            1.058    0.083   12.781    0.000
   .Q3.1_28           1.015    0.081   12.512    0.000
   .Q3.1_25           0.980    0.088   11.095    0.000
   .Q3.1_30           0.937    0.080   11.651    0.000
   .Q3.1_26           1.052    0.085   12.346    0.000
   .Q4_17             0.524    0.047   11.080    0.000
   .Q4_19             0.396    0.043    9.309    0.000
   .Q4_13             0.490    0.048   10.285    0.000
   .Q4_12             0.700    0.065   10.758    0.000
   .Q4_18             0.481    0.046   10.546    0.000
   .Q4_16             0.804    0.073   11.064    0.000
   .Q4_15             0.721    0.060   11.950    0.000
   .Q4_11             0.724    0.065   11.095    0.000
   .Q4_10             0.710    0.061   11.557    0.000
   .Q4_9              0.456    0.044   10.337    0.000
   .Q4_3              0.676    0.053   12.785    0.000
   .Q4_8              0.650    0.055   11.908    0.000
   .Q4_4              0.636    0.058   10.974    0.000
   .Q4_6              0.590    0.055   10.812    0.000
   .Q4_2              0.651    0.047   13.922    0.000
    Critical          0.967    0.092   10.531    0.000
    minimising     0.925    0.099    9.366    0.000
    helpful           1.075    0.089   12.072    0.000

Terrence Jorgensen

unread,
Jan 25, 2019, 9:18:32 AM1/25/19
to lavaan
there is an issue with negative covar between two of the factors; minimising ~~  helpful =  -0.010 

In that case, the higher-order factor is empirically underidentified.  That covariance is essentially zero, so many combinations of factor loading estimates could yield essentially identical model-implied covariance matrices.  If any of your (lower-order factor) covariances are zero, that implies a (higher-order) factor model is not appropriate.  Higher scores on the higher-order factor should simultaneously increase all lower-order factor scores, which is why they should positively covary.
Reply all
Reply to author
Forward
0 new messages