Heywood Cases on the Manifest Variables

Pemodelan Persamaan Struktural dengan lavaan di R

Erin Buchanan

Professor

Why Negative Variances?

  • Reasons a negative variance might occur:
    • The model might be misspecified or under identified
    • Smaller sample size or sampling fluctuations
    • Manifest variables have different scales
    • Data is skewed or otherwise non-normal
Pemodelan Persamaan Struktural dengan lavaan di R

Negative Variance Example

negative.model <- 'latent1 =~ V1 + V2 + V3
    latent2 =~ V4 + V5 + V6'
negative.fit <- cfa(negative.model, data = negative_data)
Warning message:
In lavaan::lavaan(model = negative.model, 
  data = negative_data,  :
  lavaan WARNING: model has NOT converged!
Pemodelan Persamaan Struktural dengan lavaan di R

Summarize to View Heywood Case

summary(negative.fit, standardized = TRUE,
        fit.measures = TRUE, rsquare = TRUE)
** WARNING ** lavaan (0.5-23.1097) did 
   NOT converge after 10000 iterations
** WARNING ** Estimates below are most likely unreliable
Variances:
         Estimate  Std.Err z-value P(>|z|)  Std.lv  Std.all
   .V2    -3949.334      NA                -3949.334 -211.745
   .V5    11885.910      NA                11885.910 615.668
Pemodelan Persamaan Struktural dengan lavaan di R

Investigate R-Square Output

R-Square:
                   Estimate 
    V1                 0.001
    V2                    NA
    V3                 0.000
    V4                -0.000
    V5              -614.668
    V6                -0.000
var(negative_data$V2)
18.83833
Pemodelan Persamaan Struktural dengan lavaan di R

Update the Model

negative.model <- 'latent1 =~ V1 + V2 + V3
    latent2 =~ V4 + V5 + V6
    V2 ~~ 18.83833*V2'

negative.fit <- cfa(negative.model,
                    data = negative_data)

summary(negative.fit,
        standardized = TRUE,
        fit.measures = TRUE,
        rsquare = TRUE)
Pemodelan Persamaan Struktural dengan lavaan di R

New Updated Output

Variances:
          Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .V2      18.838                              18.838    0.962
   .V1       7.655    1.145    6.687    0.000    7.655    0.772
   .V3      16.100    1.580   10.189    0.000   16.100    0.848
   .V4      13.866    1.017   13.638    0.000   13.866    0.876
   .V5       8.851    5.472    1.617    0.106    8.851    0.400
   .V6      12.336    0.599   20.596    0.000   12.336    0.956
    latent1  2.261    1.128    2.004    0.045    1.000    1.000
    latent2  1.956    0.875    2.236    0.025    1.000    1.000
Pemodelan Persamaan Struktural dengan lavaan di R

Negative Variance Example (5)

R-Square:
                   Estimate
    V2                0.038
    V1                0.228
    V3                0.152
    V4                0.124
    V5                0.600
    V6                0.044
Pemodelan Persamaan Struktural dengan lavaan di R

Let's practice!

Pemodelan Persamaan Struktural dengan lavaan di R

Preparing Video For Download...