Please help with Heywood cases and poor fit for latent growth curve model

48 views
Skip to first unread message

Jennifer S

unread,
Sep 26, 2025, 3:58:29 PM (14 days ago) Sep 26
to lavaan
Hi all, 
A team member and I could use some additional help as we are trying to run analyses with a second-order latent growth curve model. After trying all we can come up with on our end and speaking with our department statistician, we still have significant negative variances and fit indices that do not meet pre-specified criteria and are at a dead end. 

Here is the code and fit indices for our preregistered model specification:
LGC_cog <-'
Cog_T1=~1*immc_m0_z3+p1*delmc_m0_z3+p2*ccc_m0_z3                          
Cog_T2=~1*immc_m6_z3+p1*delmc_m6_z3+p2*ccc_m6_z3
Cog_T3=~1*immc_m18_z3+p1*delmc_m18_z3+p2*ccc_m18_z3        

# Estimates
intercept=~1*Cog_T1+1*Cog_T2+1*Cog_T3
slope=~-3*Cog_T1+-2*Cog_T2+0*Cog_T3

# Intercepts
intercept ~1
slope ~1
Cog_T1 ~ 0*1
Cog_T2 ~ 0*1
Cog_T3 ~ 0*1
immc_m0_z3 ~ 0*1
immc_m6_z3 ~ 0*1
immc_m18_z3 ~ 0*1
delmc_m0_z3 ~ 0*1
delmc_m6_z3 ~ 0*1
delmc_m18_z3 ~ 0*1
ccc_m0_z3 ~ 0*1
ccc_m6_z3 ~ 0*1
ccc_m18_z3 ~ 0*1

# Variances
immc_m0_z3~~v1*immc_m0_z3
delmc_m0_z3~~v2*delmc_m0_z3
ccc_m0_z3~~v3*ccc_m0_z3

immc_m6_z3~~v1*immc_m6_z3
delmc_m6_z3~~v2*delmc_m6_z3
ccc_m6_z3~~v3*ccc_m6_z3

immc_m18_z3~~v1*immc_m18_z3
delmc_m18_z3~~v2*delmc_m18_z3
ccc_m18_z3~~v3*ccc_m18_z3

intercept ~~  intercept
slope ~~  slope  
intercept ~~ slope
Cog_T1 ~~   Cog_T1
Cog_T2 ~~   Cog_T2  
Cog_T3 ~~   Cog_T3
'
Fit indices for original model: CFI 0.708, RMSEA 0.229, SRMR 0.169; significant negative variances for Cog_T1 (-0.174) and Cog_T3 (-0.632)

Since then, we have removed measurement invariance, added covariance terms between immc&delmc due to high correlation, and added covariances within indicators to improve model fit, which you will see reflected in the code for the most up-to-date model below. We have also tried changing the estimator to MLR, relaxed the constraint on equal residual covariance (cv), relaxed the constraint on equal residual variances (v1, v2, v3), and relaxed cv and v1/v2/v3 in the same model.  These did not improve fit nor fix negative variances and thus are not included in the most up-to-date model specification. Below is the current model specification and output - does anyone have any suggestions for additional things we could try regarding model fit and/or negative variances? Thank you very much!

LGC_cog <-'
Cog_T1=~1*immc_m0_z3+delmc_m0_z3+ccc_m0_z3                          
Cog_T2=~1*immc_m6_z3+delmc_m6_z3+ccc_m6_z3
Cog_T3=~1*immc_m18_z3+delmc_m18_z3+ccc_m18_z3        

# Estimates
intercept=~1*Cog_T1+1*Cog_T2+1*Cog_T3
slope=~-3*Cog_T1+-2*Cog_T2+0*Cog_T3

# Intercepts
intercept ~1
slope ~1
Cog_T1 ~ 0*1
Cog_T2 ~ 0*1
Cog_T3 ~ 0*1
immc_m0_z3 ~ 0*1
immc_m6_z3 ~ 0*1
immc_m18_z3 ~ 0*1
delmc_m0_z3 ~ 0*1
delmc_m6_z3 ~ 0*1
delmc_m18_z3 ~ 0*1
ccc_m0_z3 ~ 0*1
ccc_m6_z3 ~ 0*1
ccc_m18_z3 ~ 0*1

# Covariances (immc and delmc are highly correlated r = ~0.8)
immc_m0_z3~~cv*delmc_m0_z3
immc_m6_z3~~cv*delmc_m6_z3
immc_m18_z3~~cv*delmc_m18_z3

# Covariances Within Indicators
ccc_m0_z3~~ccc_m6_z3
ccc_m0_z3~~ccc_m18_z3
ccc_m6_z3~~ccc_m18_z3

delmc_m0_z3~~delmc_m6_z3
delmc_m0_z3~~delmc_m18_z3
delmc_m6_z3~~delmc_m18_z3

immc_m0_z3~~immc_m6_z3
immc_m0_z3~~immc_m18_z3
immc_m6_z3~~immc_m18_z3

# Variances

immc_m0_z3~~v1*immc_m0_z3
delmc_m0_z3~~v2*delmc_m0_z3
ccc_m0_z3~~v3*ccc_m0_z3

immc_m6_z3~~v1*immc_m6_z3
delmc_m6_z3~~v2*delmc_m6_z3
ccc_m6_z3~~v3*ccc_m6_z3

immc_m18_z3~~v1*immc_m18_z3
delmc_m18_z3~~v2*delmc_m18_z3
ccc_m18_z3~~v3*ccc_m18_z3

intercept ~~  intercept
slope ~~  slope  
intercept ~~ slope
Cog_T1 ~~   Cog_T1
Cog_T2 ~~   Cog_T2  
Cog_T3 ~~   Cog_T3
'

fit_LGC_cog <- sem(LGC_cog, data=df, estimator='ML',missing='fiml')

OUTPUT
summary(fit_LGC_cog, fit.measures=TRUE, standardized=TRUE, rsquare=TRUE)
lavaan 0.6-19 ended normally after 59 iterations

  Estimator                                         ML
  Optimization method                           NLMINB
  Number of model parameters                        35
  Number of equality constraints                     8

  Number of observations                           290
  Number of missing patterns                         5

Model Test User Model:
                                                     
  Test statistic                               119.495
  Degrees of freedom                                27
  P-value (Chi-square)                           0.000

Model Test Baseline Model:

  Test statistic                              2167.413
  Degrees of freedom                                36
  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.957
  Tucker-Lewis Index (TLI)                       0.942
                                                     
  Robust Comparative Fit Index (CFI)             0.959
  Robust Tucker-Lewis Index (TLI)                0.945

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -2288.298
  Loglikelihood unrestricted model (H1)      -2228.550
                                                     
  Akaike (AIC)                                4630.596
  Bayesian (BIC)                              4729.682
  Sample-size adjusted Bayesian (SABIC)       4644.060

Root Mean Square Error of Approximation:

  RMSEA                                          0.109
  90 Percent confidence interval - lower         0.089
  90 Percent confidence interval - upper         0.129
  P-value H_0: RMSEA <= 0.050                    0.000
  P-value H_0: RMSEA >= 0.080                    0.992
                                                     
  Robust RMSEA                                   0.112
  90 Percent confidence interval - lower         0.091
  90 Percent confidence interval - upper         0.134
  P-value H_0: Robust RMSEA <= 0.050             0.000
  P-value H_0: Robust RMSEA >= 0.080             0.994

Standardized Root Mean Square Residual:

  SRMR                                           0.104

Parameter Estimates:

  Standard errors                             Standard
  Information                                 Observed
  Observed information based on                Hessian

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  Cog_T1 =~                                                            
    immc_m0_z3        1.000                               0.610    0.826
    delmc_m0_z3       1.043    0.064   16.389    0.000    0.636    0.727
    ccc_m0_z3         0.842    0.089    9.507    0.000    0.513    0.511
  Cog_T2 =~                                                            
    immc_m6_z3        1.000                               1.115    0.937
    delmc_m6_z3       0.790    0.042   19.001    0.000    0.882    0.826
    ccc_m6_z3         0.475    0.048    9.922    0.000    0.530    0.523
  Cog_T3 =~                                                            
    immc_m18_z3       1.000                               0.974    0.920
    delmc_m18_z3      0.887    0.047   18.933    0.000    0.864    0.821
    ccc_m18_z3        0.481    0.055    8.723    0.000    0.469    0.477
  intercept =~                                                          
    Cog_T1            1.000                               2.325    2.325
    Cog_T2            1.000                               1.271    1.271
    Cog_T3            1.000                               1.455    1.455
  slope =~                                                              
    Cog_T1           -3.000                              -2.041   -2.041
    Cog_T2           -2.000                              -0.744   -0.744
    Cog_T3            0.000                               0.000    0.000

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .immc_m0_z3 ~~                                                        
   .dlmc_m0_3 (cv)    0.095    0.017    5.497    0.000    0.095    0.379
 .immc_m6_z3 ~~                                                        
   .dlmc_m6_3 (cv)    0.095    0.017    5.497    0.000    0.095    0.379
 .immc_m18_z3 ~~                                                        
   .dlmc_18_3 (cv)    0.095    0.017    5.497    0.000    0.095    0.379
 .ccc_m0_z3 ~~                                                          
   .ccc_m6_z3         0.537    0.054    9.931    0.000    0.537    0.720
   .ccc_m18_3         0.494    0.055    9.021    0.000    0.494    0.663
 .ccc_m6_z3 ~~                                                          
   .ccc_m18_3         0.545    0.056    9.815    0.000    0.545    0.731
 .delmc_m0_z3 ~~                                                        
   .dlmc_m6_3         0.161    0.028    5.736    0.000    0.161    0.445
   .dlmc_18_3         0.140    0.030    4.700    0.000    0.140    0.386
 .delmc_m6_z3 ~~                                                        
   .dlmc_18_3         0.164    0.029    5.595    0.000    0.164    0.453
 .immc_m0_z3 ~~                                                        
   .immc_m6_3        -0.038    0.027   -1.415    0.157   -0.038   -0.220
   .immc_18_3        -0.005    0.028   -0.198    0.843   -0.005   -0.032
 .immc_m6_z3 ~~                                                        
   .immc_18_3        -0.029    0.033   -0.869    0.385   -0.029   -0.166
  intercept ~~                                                          
    slope             0.477    0.065    7.354    0.000    0.811    0.811

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    intercept        -0.021    0.065   -0.324    0.746   -0.015   -0.015
    slope             0.130    0.016    8.400    0.000    0.314    0.314
   .Cog_T1            0.000                               0.000    0.000
   .Cog_T2            0.000                               0.000    0.000
   .Cog_T3            0.000                               0.000    0.000
   .immc_m0_z3        0.000                               0.000    0.000
   .immc_m6_z3        0.000                               0.000    0.000
   .immc_m18_z3       0.000                               0.000    0.000
   .delmc_m0_z3       0.000                               0.000    0.000
   .delmc_m6_z3       0.000                               0.000    0.000
   .delmc_m18_z3      0.000                               0.000    0.000
   .ccc_m0_z3         0.000                               0.000    0.000
   .ccc_m6_z3         0.000                               0.000    0.000
   .ccc_m18_z3        0.000                               0.000    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .immc_m0_3 (v1)    0.173    0.031    5.575    0.000    0.173    0.317
   .dlmc_m0_3 (v2)    0.362    0.034   10.795    0.000    0.362    0.472
   .ccc_m0_z3 (v3)    0.746    0.053   13.957    0.000    0.746    0.739
   .immc_m6_3 (v1)    0.173    0.031    5.575    0.000    0.173    0.122
   .dlmc_m6_3 (v2)    0.362    0.034   10.795    0.000    0.362    0.318
   .ccc_m6_z3 (v3)    0.746    0.053   13.957    0.000    0.746    0.727
   .immc_18_3 (v1)    0.173    0.031    5.575    0.000    0.173    0.154
   .dlmc_18_3 (v2)    0.362    0.034   10.795    0.000    0.362    0.327
   .ccc_m18_3 (v3)    0.746    0.053   13.957    0.000    0.746    0.772
    intercept         2.010    0.229    8.769    0.000    1.000    1.000
    slope             0.172    0.024    7.215    0.000    1.000    1.000
   .Cog_T1           -0.326    0.049   -6.631    0.000   -0.877   -0.877
   .Cog_T2            0.452    0.064    7.036    0.000    0.364    0.364
   .Cog_T3           -1.061    0.157   -6.752    0.000   -1.118   -1.118

R-Square:
                   Estimate
    immc_m0_z3        0.683
    delmc_m0_z3       0.528
    ccc_m0_z3         0.261
    immc_m6_z3        0.878
    delmc_m6_z3       0.682
    ccc_m6_z3         0.273
    immc_m18_z3       0.846
    delmc_m18_z3      0.673
    ccc_m18_z3        0.228
    Cog_T1               NA
    Cog_T2            0.636
    Cog_T3               NA

Edward Rigdon

unread,
Sep 26, 2025, 4:25:36 PM (14 days ago) Sep 26
to lav...@googlegroups.com
     Some thoughts--maybe not useful, but at least you know people are paying attention...
     Your time model is linear but the systematic rise in residual variances / decline in R2 across time makes me wonder if there is nonlinearity. Have you plotted these data and is the linear model plausible? Is there a time-varying covariate that might partially account for changing behavior across time?
     You need more time points to actually model, say, a quadratic time term, but as an approximation, you could play with different time intervals. Right now your data says month 0, month 6 and month 18 so you label time points -3, -2 and 0. Suppose instead of 0 you use something like +3 (that's a W.A.G.), but maybe try +1, +3, +5 and see if things get better.
     Do your constituent factor models behave well? You only have three indicators each, and a factor model of just 3 indicators is saturated, but you still would have estimates of loadings and residual variances--you could see if those make sense at that very basic level.

--
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 visit https://groups.google.com/d/msgid/lavaan/5d2b400a-ae2c-40db-af53-95dc6757e2b6n%40googlegroups.com.

Stas Kolenikov

unread,
Sep 27, 2025, 6:14:24 AM (13 days ago) Sep 27
to lav...@googlegroups.com
If you drop the model over time and just consider this as a CFA model with three factors, how does that fit?

What is the nature of the indicators that you have? Are those test scores that are kinda sorta continuous? Are those Likert scales with five values?

-- Stas Kolenikov, PhD, PStat (ASA, SSC) 
-- Principal Statistician, NORC @NORCnews
-- Opinions stated in this email are mine only, and do not reflect the position of my employer
-- Social media: @StatStas [ Twitter | mastodon.online ]
-- http://stas.kolenikov.name



Jennifer S

unread,
Sep 30, 2025, 1:07:10 PM (10 days ago) Sep 30
to lav...@googlegroups.com
Thank you both for your input so far! 

- We have inspected and plotted the data, and cognition over time seems linear
- all cognitive variables are continuous, originally on a 0-100 scale
- We did conduct CFAs, where everything appeared normal. Below is the code and output for that cognition CFA. Any additional inputs or advice would be greatly appreciated! 

model_cog_all <- '

Cog_T1 =~ immc_m0_z3 + delmc_m0_z3 + ccc_m0_z3

immc_m0_z3 ~~ immc_m0_z3

delmc_m0_z3 ~~ delmc_m0_z3

ccc_m0_z3 ~~ ccc_m0_z3

Cog_T2 =~ immc_m6_z3 + delmc_m6_z3 + ccc_m6_z3

immc_m6_z3 ~~ immc_m6_z3

delmc_m6_z3 ~~ delmc_m6_z3

ccc_m6_z3 ~~ ccc_m6_z3

Cog_T3 =~ immc_m18_z3 + delmc_m18_z3 + ccc_m18_z3

immc_m18_z3 ~~ immc_m18_z3

delmc_m18_z3 ~~ delmc_m18_z3

ccc_m18_z3 ~~ ccc_m18_z3

'

fit_cog_all <- cfa(model_cog_all, data = df)

summary(fit_cog_all, fit.measures=TRUE)

lavaan 0.6-19 ended normally after 36 iterations

  Estimator                                         ML

  Optimization method                           NLMINB

  Number of model parameters                        21

                                                  Used       Total

  Number of observations                           229         290

Model Test User Model:

                                                     

  Test statistic                               507.854

  Degrees of freedom                                24

  P-value (Chi-square)                           0.000

Model Test Baseline Model:

  Test statistic                              1913.559

  Degrees of freedom                                36

  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.742

  Tucker-Lewis Index (TLI)                       0.613

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -2131.044

  Loglikelihood unrestricted model (H1)      -1877.117

                                                     

  Akaike (AIC)                                4304.088

  Bayesian (BIC)                              4376.197

  Sample-size adjusted Bayesian (SABIC)       4309.640

Root Mean Square Error of Approximation:

  RMSEA                                          0.297

  90 Percent confidence interval - lower         0.275

  90 Percent confidence interval - upper         0.319

  P-value H_0: RMSEA <= 0.050                    0.000

  P-value H_0: RMSEA >= 0.080                    1.000

Standardized Root Mean Square Residual:

  SRMR                                           0.155

Parameter Estimates:

  Standard errors                             Standard

  Information                                 Expected

  Information saturated (h1) model          Structured

Latent Variables:

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

  Cog_T1 =~                                          

    immc_m0_z3        1.000                          

    delmc_m0_z3       1.149    0.061   18.870    0.000

    ccc_m0_z3         0.608    0.101    6.027    0.000

  Cog_T2 =~                                          

    immc_m6_z3        1.000                          

    delmc_m6_z3       0.927    0.049   18.943    0.000

    ccc_m6_z3         0.489    0.061    8.055    0.000

  Cog_T3 =~                                          

    immc_m18_z3       1.000                          

    delmc_m18_z3      0.993    0.047   20.915    0.000

    ccc_m18_z3        0.449    0.062    7.213    0.000

Covariances:

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

  Cog_T1 ~~                                          

    Cog_T2            0.578    0.065    8.949    0.000

    Cog_T3            0.553    0.062    8.931    0.000

  Cog_T2 ~~                                          

    Cog_T3            0.866    0.093    9.327    0.000

Variances:

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

   .immc_m0_z3        0.121    0.017    7.120    0.000

   .delmc_m0_z3       0.132    0.021    6.367    0.000

   .ccc_m0_z3         0.877    0.083   10.534    0.000

   .immc_m6_z3        0.215    0.032    6.801    0.000

   .delmc_m6_z3       0.265    0.033    8.111    0.000

   .ccc_m6_z3         0.687    0.066   10.444    0.000

   .immc_m18_z3       0.191    0.027    7.014    0.000

   .delmc_m18_z3      0.198    0.027    7.189    0.000

   .ccc_m18_z3        0.686    0.065   10.511    0.000

    Cog_T1            0.432    0.052    8.314    0.000

    Cog_T2            0.947    0.109    8.651    0.000

    Cog_T3            0.880    0.101    8.743    0.000




--
;]]

Jennifer S

unread,
Sep 30, 2025, 1:07:18 PM (10 days ago) Sep 30
to lavaan
Thanks to you both!

- We did plot the data, and the relationship between cognition and time seems linearly related.
- We will post the CFA for cognition, with its 3 indicators at all 3 timepoints, below. We think the loadings and residual variances seem to be fine. 
- Each indicator is a continuous score, originally on a scale of 0-100. 
Please let us know if this helps come up with any additional things for us to try or consider, and thank you again!

model_cog_all <- '

Cog_T1 =~ immc_m0_z3 + delmc_m0_z3 + ccc_m0_z3

immc_m0_z3 ~~ immc_m0_z3

delmc_m0_z3 ~~ delmc_m0_z3

ccc_m0_z3 ~~ ccc_m0_z3

Cog_T2 =~ immc_m6_z3 + delmc_m6_z3 + ccc_m6_z3

immc_m6_z3 ~~ immc_m6_z3

delmc_m6_z3 ~~ delmc_m6_z3

ccc_m6_z3 ~~ ccc_m6_z3

Cog_T3 =~ immc_m18_z3 + delmc_m18_z3 + ccc_m18_z3

immc_m18_z3 ~~ immc_m18_z3

delmc_m18_z3 ~~ delmc_m18_z3

ccc_m18_z3 ~~ ccc_m18_z3

'

fit_cog_all <- cfa(model_cog_all, data = df)

summary(fit_cog_all, fit.measures=TRUE)

lavaan 0.6-19 ended normally after 36 iterations

  Estimator                                         ML

  Optimization method                           NLMINB

  Number of model parameters                        21

                                                  Used       Total

  Number of observations                           229         290

Model Test User Model:

                                                     

  Test statistic                               507.854

  Degrees of freedom                                24

  P-value (Chi-square)                           0.000

Model Test Baseline Model:

  Test statistic                              1913.559

  Degrees of freedom                                36

  P-value                                        0.000

User Model versus Baseline Model:

  Comparative Fit Index (CFI)                    0.742

  Tucker-Lewis Index (TLI)                       0.613

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)              -2131.044

  Loglikelihood unrestricted model (H1)      -1877.117

                                                     

  Akaike (AIC)                                4304.088

  Bayesian (BIC)                              4376.197

  Sample-size adjusted Bayesian (SABIC)       4309.640

Root Mean Square Error of Approximation:

  RMSEA                                          0.297

  90 Percent confidence interval - lower         0.275

  90 Percent confidence interval - upper         0.319

  P-value H_0: RMSEA <= 0.050                    0.000

  P-value H_0: RMSEA >= 0.080                    1.000

Standardized Root Mean Square Residual:

  SRMR                                           0.155

Parameter Estimates:

  Standard errors                             Standard

  Information                                 Expected

  Information saturated (h1) model          Structured

Latent Variables:

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

  Cog_T1 =~                                          

    immc_m0_z3        1.000                          

    delmc_m0_z3       1.149    0.061   18.870    0.000

    ccc_m0_z3         0.608    0.101    6.027    0.000

  Cog_T2 =~                                          

    immc_m6_z3        1.000                          

    delmc_m6_z3       0.927    0.049   18.943    0.000

    ccc_m6_z3         0.489    0.061    8.055    0.000

  Cog_T3 =~                                          

    immc_m18_z3       1.000                          

    delmc_m18_z3      0.993    0.047   20.915    0.000

    ccc_m18_z3        0.449    0.062    7.213    0.000

Covariances:

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

  Cog_T1 ~~                                          

    Cog_T2            0.578    0.065    8.949    0.000

    Cog_T3            0.553    0.062    8.931    0.000

  Cog_T2 ~~                                          

    Cog_T3            0.866    0.093    9.327    0.000

Variances:

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

   .immc_m0_z3        0.121    0.017    7.120    0.000

   .delmc_m0_z3       0.132    0.021    6.367    0.000

   .ccc_m0_z3         0.877    0.083   10.534    0.000

   .immc_m6_z3        0.215    0.032    6.801    0.000

   .delmc_m6_z3       0.265    0.033    8.111    0.000

   .ccc_m6_z3         0.687    0.066   10.444    0.000

   .immc_m18_z3       0.191    0.027    7.014    0.000

   .delmc_m18_z3      0.198    0.027    7.189    0.000

   .ccc_m18_z3        0.686    0.065   10.511    0.000

    Cog_T1            0.432    0.052    8.314    0.000

    Cog_T2            0.947    0.109    8.651    0.000

    Cog_T3            0.880    0.101    8.743    0.000


Reply all
Reply to author
Forward
0 new messages