Heywood Cases on the Latent Variable

Structural Equation Modeling with lavaan in R

Erin Buchanan

Professor

Heywood Cases

  • Correlations that are out of bounds
  • Negative variances

Example Model Diagram with Heywood Cases

Structural Equation Modeling with lavaan in R

A Latent Variable Example

epi.model <- 'extraversion =~ V3 + V7 + V11 + V15
    neuroticism =~ V1 + V5 + V9 + V13
    lying =~ V4 + V8 + V12 + V16'
epi.fit <- cfa(model = epi.model, data = epi)
Warning message:
In lav_object_post_check(object) :
  lavaan WARNING: covariance matrix of latent variables
                is not positive definite;
                use inspect(fit,"cov.lv") to investigate.
Structural Equation Modeling with lavaan in R

How to Find the Error

summary(epi.fit, standardized = TRUE, 
        fit.measures = TRUE)
Covariances:
                Estimate Std.Err z-value P(>|z|)  Std.lv Std.all
  extraversion ~~                                                       
    neuroticism  -0.011   0.002  -6.822   0.000  -0.894  -0.894
    lying        -0.012   0.002  -6.801   0.000  -0.777  -0.777
  neuroticism ~~                                                        
    lying         0.012   0.002   7.023   0.000   0.982   0.982
Structural Equation Modeling with lavaan in R

How to Fix the Error

#original model
epi.model <- 'extraversion =~ V3 + V7 + V11 + V15
    neuroticism =~ V1 + V5 + V9 + V13
    lying =~ V4 + V8 + V12 + V16'
#respecify the model
epi.model2 <- 'extraversion =~ V3 + V7 + V11 + V15
    neuroticism_lie =~ V1 + V5 + V9 + V13 + V4 + V8 + V12 + V16'

epi.fit2 <- cfa(model = epi.model2, data = epi)
summary(epi.fit2, standardized = T, fit.measures = T)
Structural Equation Modeling with lavaan in R

How to Fix the Error (2)

Covariances:
                 Estimate Std.Err z-value P(>|z|)  Std.lv Std.all
  extraversion ~~                                                       
    neuroticism_li -0.011   0.002  -6.939   0.000  -0.843  -0.843
Structural Equation Modeling with lavaan in R

Let's practice!

Structural Equation Modeling with lavaan in R

Preparing Video For Download...