First off, I apologize for the long post. Any help or direction anyone can give me would be of great help.
I just want to confirm that I am using the appropriate method (Latent growth curve modeling) and Lavaan properly. i have a few questions And i will try to ask them as I go.
My PI is interested in "if changes in PH are associated with changes in TNF". Additionally, there are two groups (G1 = BC and G2 = HC) which should have different trajectories. Of note BC has an n = 106 and HC has an n = 56.
The expected trajectory for both PH for BC is to deviate from baseline at time 2, then come closer at time 3, with no differences at time 4, while the trajectory from HC is simply linear. (see the code for PH below)
the problem is that when i run it i get a warning. I believe because in the HC group the variance of the slope of PH is estimated as negative, but it isnt when run on its own.
Warning message:
In lav_object_post_check(object) :
lavaan WARNING: some estimated lv variances are negative
> summary(fit.PHTNF, standardized = T, ci = TRUE)
lavaan (0.5-23.1097) converged normally after 391 iterations
Used Total
Number of observations per group
BC 94 106
HC 53 56
Estimator ML Robust
Minimum Function Test Statistic 111.383 121.369
Degrees of freedom 48 48
P-value (Chi-square) 0.000 0.000
Scaling correction factor 0.918
for the Yuan-Bentler correction
Chi-square for each group:
BC 66.682 72.660
HC 44.701 48.709
Parameter Estimates:
Information Observed
Standard Errors Robust.huber.white
Group 1 [BC]:
Latent Variables:
Estimate Std.Err z-value P(>|z|) ci.lower ci.upper Std.lv Std.all
i.PH =~
sq_phT1 1.000 1.000 1.000 2.166 0.839
sq_phT2 1.000 1.000 1.000 2.166 0.846
sq_phT3 1.000 1.000 1.000 2.166 0.872
sq_phT4 1.000 1.000 1.000 2.166 0.832
i.TNF =~
Log10T1sTNFRII 1.000 1.000 1.000 0.131 0.963
Log10T2sTNFRII 1.000 1.000 1.000 0.131 0.834
Lg10sTNFRII_T3 1.000 1.000 1.000 0.131 0.857
Lg10sTNFRII_T4 1.000 1.000 1.000 0.131 0.859
s.PH =~
sq_phT1 0.000 0.000 0.000 0.000 0.000
sq_phT2 1.000 1.000 1.000 0.786 0.307
sq_phT3 0.500 0.500 0.500 0.393 0.158
sq_phT4 0.500 0.500 0.500 0.393 0.151
s.TNF =~
Log10T1sTNFRII 0.000 0.000 0.000 0.000 0.000
Log10T2sTNFRII 1.000 1.000 1.000 0.023 0.146
Lg10sTNFRII_T3 2.000 2.000 2.000 0.046 0.300
Lg10sTNFRII_T4 3.000 3.000 3.000 0.069 0.451
Regressions:
Estimate Std.Err z-value P(>|z|) ci.lower ci.upper Std.lv Std.all
s.PH ~
s.TNF -30.093 11.547 -2.606 0.009 -52.725 -7.461 -0.875 -0.875
i.PH ~
i.TNF -8.884 1.310 -6.779 0.000 -11.452 -6.316 -0.536 -0.536
Covariances:
Estimate Std.Err z-value P(>|z|) ci.lower ci.upper Std.lv Std.all
.i.PH ~~
.s.PH -0.881 0.832 -1.059 0.290 -2.510 0.749 -1.267 -1.267
i.TNF ~~
s.TNF -0.000 0.000 -0.003 0.998 -0.001 0.001 -0.000 -0.000
Intercepts:
Estimate Std.Err z-value P(>|z|) ci.lower ci.upper Std.lv Std.all
.i.PH 36.628 4.399 8.326 0.000 28.005 45.250 16.909 16.909
.s.PH -1.340 0.291 -4.608 0.000 -1.910 -0.770 -1.705 -1.705
i.TNF 3.362 0.015 230.834 0.000 3.333 3.390 25.738 25.738
s.TNF 0.014 0.004 3.672 0.000 0.006 0.021 0.605 0.605
.sq_phT1 0.000 0.000 0.000 0.000 0.000
.sq_phT2 0.000 0.000 0.000 0.000 0.000
.sq_phT3 0.000 0.000 0.000 0.000 0.000
.sq_phT4 0.000 0.000 0.000 0.000 0.000
.Log10T1sTNFRII 0.000 0.000 0.000 0.000 0.000
.Log10T2sTNFRII 0.000 0.000 0.000 0.000 0.000
.Lg10sTNFRII_T3 0.000 0.000 0.000 0.000 0.000
.Lg10sTNFRII_T4 0.000 0.000 0.000 0.000 0.000
Variances:
Estimate Std.Err z-value P(>|z|) ci.lower ci.upper Std.lv Std.all
.i.PH 3.346 0.660 5.067 0.000 2.052 4.640 0.713 0.713
i.TNF 0.017 0.005 3.419 0.001 0.007 0.027 1.000 1.000
.s.PH 0.144 1.352 0.107 0.915 -2.506 2.795 0.234 0.234
s.TNF 0.001 0.000 3.406 0.001 0.000 0.001 1.000 1.000
.sq_phT1 1.972 0.664 2.972 0.003 0.672 3.273 1.972 0.296
.sq_phT2 3.010 0.793 3.794 0.000 1.455 4.565 3.010 0.459
.sq_phT3 2.206 0.467 4.725 0.000 1.291 3.121 2.206 0.357
.sq_phT4 2.807 0.649 4.323 0.000 1.535 4.080 2.807 0.414
.Log10T1sTNFRII 0.001 0.001 1.597 0.110 -0.000 0.003 0.001 0.072
.Log10T2sTNFRII 0.007 0.002 3.274 0.001 0.003 0.011 0.007 0.284
.Lg10sTNFRII_T3 0.004 0.001 3.895 0.000 0.002 0.006 0.004 0.176
.Lg10sTNFRII_T4 0.001 0.001 1.583 0.113 -0.000 0.003 0.001 0.059
Group 2 [HC]:
Latent Variables:
Estimate Std.Err z-value P(>|z|) ci.lower ci.upper Std.lv Std.all
i.PH =~
sq_phT1 1.000 1.000 1.000 1.773 0.888
sq_phT2 1.000 1.000 1.000 1.773 0.851
sq_phT3 1.000 1.000 1.000 1.773 0.887
sq_phT4 1.000 1.000 1.000 1.773 0.793
i.TNF =~
Log10T1sTNFRII 1.000 1.000 1.000 0.109 0.974
Log10T2sTNFRII 1.000 1.000 1.000 0.109 0.957
Lg10sTNFRII_T3 1.000 1.000 1.000 0.109 0.837
Lg10sTNFRII_T4 1.000 1.000 1.000 0.109 0.941
s.PH =~
sq_phT1 0.000 0.000 0.000 NaN NaN
sq_phT2 1.000 1.000 1.000 NaN NaN
sq_phT3 2.000 2.000 2.000 NaN NaN
sq_phT4 3.000 3.000 3.000 NaN NaN
s.TNF =~
Log10T1sTNFRII 0.000 0.000 0.000 0.000 0.000
Log10T2sTNFRII 1.000 1.000 1.000 0.012 0.104
Lg10sTNFRII_T3 2.000 2.000 2.000 0.024 0.182
Lg10sTNFRII_T4 3.000 3.000 3.000 0.036 0.306
Regressions:
Estimate Std.Err z-value P(>|z|) ci.lower ci.upper Std.lv Std.all
s.PH ~
s.TNF -9.705 10.200 -0.952 0.341 -29.697 10.286 NaN NaN
i.PH ~
i.TNF -3.570 2.234 -1.598 0.110 -7.948 0.808 -0.220 -0.220
Covariances:
Estimate Std.Err z-value P(>|z|) ci.lower ci.upper Std.lv Std.all
.i.PH ~~
.s.PH 0.017 0.160 0.104 0.917 -0.297 0.331 0.078 0.078
i.TNF ~~
s.TNF -0.000 0.000 -0.189 0.850 -0.001 0.000 -0.041 -0.041
Intercepts:
Estimate Std.Err z-value P(>|z|) ci.lower ci.upper Std.lv Std.all
.i.PH 18.934 7.375 2.567 0.010 4.479 33.388 10.680 10.680
.s.PH 0.295 0.148 1.993 0.046 0.005 0.585 NaN NaN
i.TNF 3.327 0.016 211.691 0.000 3.296 3.358 30.412 30.412
s.TNF 0.012 0.002 5.130 0.000 0.008 0.017 1.048 1.048
.sq_phT1 0.000 0.000 0.000 0.000 0.000
.sq_phT2 0.000 0.000 0.000 0.000 0.000
.sq_phT3 0.000 0.000 0.000 0.000 0.000
.sq_phT4 0.000 0.000 0.000 0.000 0.000
.Log10T1sTNFRII 0.000 0.000 0.000 0.000 0.000
.Log10T2sTNFRII 0.000 0.000 0.000 0.000 0.000
.Lg10sTNFRII_T3 0.000 0.000 0.000 0.000 0.000
.Lg10sTNFRII_T4 0.000 0.000 0.000 0.000 0.000
Variances:
Estimate Std.Err z-value P(>|z|) ci.lower ci.upper Std.lv Std.all
.i.PH 2.991 0.560 5.343 0.000 1.894 4.088 0.951 0.951
i.TNF 0.012 0.002 6.040 0.000 0.008 0.016 1.000 1.000
.s.PH -0.015 0.098 -0.156 0.876 -0.208 0.177 NaN NaN
s.TNF 0.000 0.000 1.016 0.310 -0.000 0.000 1.000 1.000
.sq_phT1 0.843 0.416 2.027 0.043 0.028 1.657 0.843 0.211
.sq_phT2 1.166 0.597 1.952 0.051 -0.005 2.337 1.166 0.269
.sq_phT3 0.804 0.257 3.128 0.002 0.300 1.308 0.804 0.201
.sq_phT4 1.786 0.597 2.990 0.003 0.615 2.956 1.786 0.357
.Log10T1sTNFRII 0.001 0.000 1.420 0.156 -0.000 0.002 0.001 0.052
.Log10T2sTNFRII 0.001 0.000 2.461 0.014 0.000 0.002 0.001 0.082
.Lg10sTNFRII_T3 0.005 0.002 1.965 0.049 0.000 0.010 0.005 0.279
.Lg10sTNFRII_T4 0.001 0.001 0.661 0.509 -0.001 0.002 0.001 0.045
Warning messages:
1: In sqrt(ETA2) : NaNs produced
2: In sqrt(ETA2) : NaNs produced
3: In sqrt(ETA2) : NaNs produced