correlation between slopes, Latent growth modeling

242 views
Skip to first unread message

Nicolas Barreto

unread,
Apr 30, 2018, 5:07:41 PM4/30/18
to lavaan
Hello again all, 

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)

PH <-'
#intercept 
i.PH =~ 1*sq_phT1 + 1*sq_phT2 + 1*sq_phT3 + 1*sq_phT4
#slope
s.PH =~ 0*sq_phT1 + 1*sq_phT2 + c(.5,2)*sq_phT3 + c(.5,3)*sq_phT4
#fixed efects
i.PH ~ 1
s.PH ~ 1
#random effects
i.PH ~~ i.PH
s.PH ~~ s.PH
i.PH ~~ s.PH
'
summary(lavaan(PH,data=dat, auto.var=T,estimator="MLR", group = "HCvBC"))

Q1) I interpreted my PI's question to be asking about the correlation between slopes of PH and TNF. Does that make sense?
Q2) Is multivariate latent growth curve modeling the most appropriate analytic strategy? I know there are other methods (repeated measure anova, panel models, etc.) to do longitudinal data, but do they answer if the longitudinal change in one variable is associated with the longitudinal change in the other?
Q3) have I done the model specification properly?


below is the model specification for assessing both variables together

PH.TNF <- '
#intercept 
i.PH =~ 1*sq_phT1 + 1*sq_phT2 + 1*sq_phT3 + 1*sq_phT4
i.TNF =~ 1*Log10T1sTNFRII + 1*Log10T2sTNFRII + 1*Log10sTNFRII_T3 + 1*Log10sTNFRII_T4
#slope
s.PH =~ 0*sq_phT1 + 1*sq_phT2 + c(.5,2)*sq_phT3 + c(.5,3)*sq_phT4
#s.TNF =~ 0*Log10T1sTNFRII + 1*Log10T2sTNFRII + c(.5,2)*Log10sTNFRII_T3 + c(.5,3)*Log10sTNFRII_T4
s.TNF =~ 0*Log10T1sTNFRII + 1*Log10T2sTNFRII + 2*Log10sTNFRII_T3 + 3*Log10sTNFRII_T4
#fixed effects 
i.PH ~ 1
s.PH ~ 1
i.TNF ~ 1
s.TNF ~ 1
#random effects (intercept and slope)
i.PH ~~ i.PH
i.TNF ~~ i.TNF 
s.PH ~~ s.PH
s.TNF ~~ s.TNF
i.PH ~~ s.PH
i.TNF ~~ s.TNF
#regressions
s.PH ~ s.TNF
i.PH ~ i.TNF 
'
fit.PHTNF <- lavaan(PH.TNF, data = dat, auto.var = T, estimator = "MLR", group = "HCvBC")
summary(fit.PHTNF, standardized = T, ci = TRUE)

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.
Q4) have I done something wrong?

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

Terrence Jorgensen

unread,
May 4, 2018, 6:49:50 AM5/4/18
to lavaan
 
Q1) I interpreted my PI's question to be asking about the correlation between slopes of PH and TNF. Does that make sense?

Sounds reasonable, that's how I would interpret it, too.
 
Q2) Is multivariate latent growth curve modeling the most appropriate analytic strategy? I know there are other methods (repeated measure anova, panel models, etc.) to do longitudinal data, but do they answer if the longitudinal change in one variable is associated with the longitudinal change in the other?

Since you have nonlinear change of PH in one group, I think it is more complicated.  In the case of linear change, a single slope describes the change, so you can look at a single correlation between the latent slopes of PH and TNF.  But to model nonlinear change in the other group, it sounds like your expectations would be better suited to using latent difference scores, which are equivalent to having a latent "slope" at each time after baseline that merely represents change from baseline (you could also specify it to be change from the previous time, which is the usual application of latent difference scores).  Here is a good book:


Anyway, in that case, you can't boil the "relationship" between the 2 change process down to a single correlation.  The change (linear slope?) in TNF will have a correlation between each latent-change factor used to represent nonlinear change in PH.  I suppose you could report each one, but talk to your PI about it.

Q3) have I done the model specification properly?

You have 2 groups, so you need to specify both fixed values, even if it is the same fixed value:

i.PH =~ c(1, 1)*sq_phT1 + c(1, 1)*sq_phT2 + ...

And make sure to free parameters using NA, to make sure they are estimated, for example:

i.PH ~ c(NA, NA)*1


#regressions
s.PH ~ s.TNF
i.PH ~ i.TNF 
'

Why as regressions?  You said you wanted the correlation, so just specify them as covariances (~~)

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,

Correct

Q4) have I done something wrong?

You have very small samples, so there is a lot of sampling variability in these estimates.  As you can see, the 95% CI includes positive values, so this negative-variance estimate is consistent with sampling error.


Variances:
                   Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper   Std.lv  Std.all
   .s.PH             -0.015    0.098   -0.156    0.876   -0.208    0.177      NaN      NaN

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

Nicolas Barreto

unread,
May 21, 2018, 6:31:25 PM5/21/18
to lav...@googlegroups.com
Hello,

First, thank you so much for the advice and direction Terrence, it was of great help. I got the Newsome book and the latent difference score models work great. 

I do have some follow up questions though, 

I still want to compare to groups, and I can write the code to run it, but I am curious how to apply some of the difference score analyses the book suggets. For example, setting the means of the latent change scores to be the same will allow the use of the chi-square test statistic to serve as something of a test for if the change is the same across between all time points (i.e. linear change). My question is how to apply this to multigroup analysis. 

below is my code and output for an analysis. 

I have set the means to be the same within each subgroup (a for group1 and b for group2), so that i can determine if there is an argument for assuming linearity or not. I can then run a dual latent difference score model with two variables that change over time, and correlate their difference scores at each time point to assess their relationship across time, within each group. 

However, I am not sure now what/how i should be interpreting the chi-squares for the model information. 

Q1) is the minimum test statistic being non-significant now suggest that the model fits better keeping the groups separated?
Q2) would i look at the individual group chi-square and as the measure of if there is a difference in the differences across time? i.e. for group1 chi-square =  5.061. if that is over the critical value (see Q3) it would be significant, which would suggest that the difference scores are not equivalent across time. 
Q3) how do i go about determining the df for that chi-square? my guess is # difference scores - 1...but i am not sure

Any additional help would be wonderful. Thank you, and sorry again for the long post. 

il6.multi <- ' #defin latent difference factors;
ch.il2 =~ 1*Log10T2IL6
ch.il3 =~ 1*Log10T3IL6
ch.il4 =~ 1*Log10T4IL6

#autoregressive paths set to 1;
Log10T2IL6 ~ 1*Log10T1IL6
Log10T3IL6 ~ 1*Log10T2IL6
Log10T4IL6 ~ 1*Log10T3IL6

#means and intercepts;
ch.il2~c(a,b)*1 
ch.il3~c(a,b)*1
ch.il4~c(a,b)*1
Log10T1IL6~1
Log10T2IL6~0
Log10T3IL6~0
Log10T4IL6~0

#estimate exogenous covariances;
Log10T1IL6  ~~ ch.il2 + ch.il3 + ch.il4
ch.il2 ~~ ch.il3 + ch.il4
ch.il3 ~~ ch.il4

#estimate exogenous variances;
Log10T1IL6 ~~ Log10T1IL6 
ch.il2 ~~ ch.il2
ch.il3 ~~ ch.il3
ch.il4 ~~ ch.il4

#disturbances set to 0;
Log10T2IL6 ~~ 0*Log10T2IL6
Log10T3IL6 ~~ 0*Log10T3IL6
Log10T4IL6 ~~ 0*Log10T4IL6
'
dif.il6.multi <- lavaan(il6.multi, data = dat, auto.var=TRUE, estimator = "MLR",
                   group = "HCvBC", group.equal = "loadings")

> summary(dif.il6.multi, standardized = T, ci = T)
lavaan (0.5-23.1097) converged normally after 114 iterations

                                                  Used       Total
  Number of observations per group         
  Breast Cancer                                     92         106
  Healthy Control                                   52          56

  Estimator                                         ML      Robust
  Minimum Function Test Statistic                6.068       6.683
  Degrees of freedom                                 4           4
  P-value (Chi-square)                           0.194       0.154
  Scaling correction factor                                  0.908
    for the Yuan-Bentler correction

Chi-square for each group:

  Breast Cancer                                  5.061       5.574
  Healthy Control                                1.007       1.109

Parameter Estimates:

  Information                                 Observed
  Standard Errors                   Robust.huber.white


Group 1 [Breast Cancer]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper   Std.lv  Std.all
  ch.il2 =~                                                                               
    Log10T2IL6        1.000                               1.000    1.000    0.278    0.961
  ch.il3 =~                                                                               
    Log10T3IL6        1.000                               1.000    1.000    0.248    0.834
  ch.il4 =~                                                                               
    Log10T4IL6        1.000                               1.000    1.000    0.214    0.769

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper   Std.lv  Std.all
  Log10T2IL6 ~                                                                            
    Log10T1IL6        1.000                               1.000    1.000    1.000    1.032
  Log10T3IL6 ~                                                                            
    Log10T2IL6        1.000                               1.000    1.000    1.000    0.970
  Log10T4IL6 ~                                                                            
    Log10T3IL6        1.000                               1.000    1.000    1.000    1.068

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper   Std.lv  Std.all
  ch.il2 ~~                                                                               
    Log10T1IL6       -0.041    0.017   -2.497    0.013   -0.074   -0.009   -0.149   -0.499
  ch.il3 ~~                                                                               
    Log10T1IL6        0.005    0.009    0.525    0.599   -0.013    0.022    0.019    0.062
  ch.il4 ~~                                                                               
    Log10T1IL6       -0.007    0.007   -1.070    0.284   -0.020    0.006   -0.033   -0.110
  ch.il2 ~~                                                                               
    ch.il3           -0.033    0.009   -3.531    0.000   -0.051   -0.015   -0.476   -0.476
    ch.il4            0.000    0.006    0.066    0.947   -0.012    0.013    0.007    0.007
  ch.il3 ~~                                                                               
    ch.il4           -0.022    0.007   -3.011    0.003   -0.036   -0.008   -0.410   -0.410

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper   Std.lv  Std.all
    ch.il2     (a)   -0.003    0.011   -0.258    0.796   -0.024    0.018   -0.010   -0.010
    ch.il3     (a)   -0.003    0.011   -0.258    0.796   -0.024    0.018   -0.011   -0.011
    ch.il4     (a)   -0.003    0.011   -0.258    0.796   -0.024    0.018   -0.013   -0.013
    Log10T1IL6        0.319    0.031   10.130    0.000    0.257    0.380    0.319    1.067
   .Log10T2IL6        0.000                               0.000    0.000    0.000    0.000
   .Log10T3IL6        0.000                               0.000    0.000    0.000    0.000
   .Log10T4IL6        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
    Log10T1IL6        0.089    0.019    4.694    0.000    0.052    0.126    0.089    1.000
    ch.il2            0.077    0.015    5.014    0.000    0.047    0.107    1.000    1.000
    ch.il3            0.062    0.014    4.277    0.000    0.033    0.090    1.000    1.000
    ch.il4            0.046    0.008    5.668    0.000    0.030    0.062    1.000    1.000
   .Log10T2IL6        0.000                               0.000    0.000    0.000    0.000
   .Log10T3IL6        0.000                               0.000    0.000    0.000    0.000
   .Log10T4IL6        0.000                               0.000    0.000    0.000    0.000


Group 2 [Healthy Control]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper   Std.lv  Std.all
  ch.il2 =~                                                                               
    Log10T2IL6        1.000                               1.000    1.000    0.139    0.661
  ch.il3 =~                                                                               
    Log10T3IL6        1.000                               1.000    1.000    0.166    0.802
  ch.il4 =~                                                                               
    Log10T4IL6        1.000                               1.000    1.000    0.195    0.843

Regressions:
                   Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper   Std.lv  Std.all
  Log10T2IL6 ~                                                                            
    Log10T1IL6        1.000                               1.000    1.000    1.000    1.137
  Log10T3IL6 ~                                                                            
    Log10T2IL6        1.000                               1.000    1.000    1.000    1.019
  Log10T4IL6 ~                                                                            
    Log10T3IL6        1.000                               1.000    1.000    1.000    0.892

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper   Std.lv  Std.all
  ch.il2 ~~                                                                               
    Log10T1IL6       -0.016    0.006   -2.605    0.009   -0.028   -0.004   -0.116   -0.486
  ch.il3 ~~                                                                               
    Log10T1IL6       -0.009    0.006   -1.598    0.110   -0.020    0.002   -0.054   -0.226
  ch.il4 ~~                                                                               
    Log10T1IL6        0.008    0.007    1.205    0.228   -0.005    0.021    0.041    0.172
  ch.il2 ~~                                                                               
    ch.il3           -0.006    0.004   -1.573    0.116   -0.013    0.001   -0.242   -0.242
    ch.il4           -0.002    0.003   -0.743    0.458   -0.009    0.004   -0.091   -0.091
  ch.il3 ~~                                                                               
    ch.il4           -0.019    0.004   -4.586    0.000   -0.027   -0.011   -0.592   -0.592

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|) ci.lower ci.upper   Std.lv  Std.all
    ch.il2     (b)   -0.012    0.008   -1.549    0.121   -0.028    0.003   -0.089   -0.089
    ch.il3     (b)   -0.012    0.008   -1.549    0.121   -0.028    0.003   -0.075   -0.075
    ch.il4     (b)   -0.012    0.008   -1.549    0.121   -0.028    0.003   -0.063   -0.063
    Log10T1IL6        0.176    0.031    5.739    0.000    0.116    0.236    0.176    0.735
   .Log10T2IL6        0.000                               0.000    0.000    0.000    0.000
   .Log10T3IL6        0.000                               0.000    0.000    0.000    0.000
   .Log10T4IL6        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
    Log10T1IL6        0.057    0.012    4.976    0.000    0.035    0.080    0.057    1.000
    ch.il2            0.019    0.004    5.006    0.000    0.012    0.027    1.000    1.000
    ch.il3            0.027    0.005    5.453    0.000    0.018    0.037    1.000    1.000
    ch.il4            0.038    0.007    5.331    0.000    0.024    0.052    1.000    1.000
   .Log10T2IL6        0.000                               0.000    0.000    0.000    0.000
   .Log10T3IL6        0.000                               0.000    0.000    0.000    0.000
   .Log10T4IL6        0.000                               0.000    0.000    0.000    0.000



Nicolas Barreto, MPH
Doctoral Student, Applied Social Psychology
Department of Behavioral and Organizational Science
Claremont Graduate University



--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/afXC3QSzc4k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

Terrence Jorgensen

unread,
May 22, 2018, 12:23:23 AM5/22/18
to lavaan
Q1) is the minimum test statistic being non-significant now suggest that the model fits better keeping the groups separated?

The test statistic for a model is testing whether that model fits as well as a saturated model (i.e., freely estimating all possible means and (co)variances).  It is not comparing that model to any other restricted/hypothesized model.

Q2) would i look at the individual group chi-square and as the measure of if there is a difference in the differences across time? i.e. for group1 chi-square =  5.061. if that is over the critical value (see Q3) it would be significant, which would suggest that the difference scores are not equivalent across time. 

The group contributions to the chi-squared are not test statistics, so you cannot use them to test any hypothesis.

Q3) how do i go about determining the df for that chi-square? my guess is # difference scores - 1...but i am not sure

The df for the test is listed with the test statistic. In order to test a particular hypothesis, you need to specify a model under which the null hypothesis is true (e.g., constrain differences to be equal, implying linearity) and a model under which the null is false (i.e., without the constraint), then compare those models using the anova() function, which returns a chi-squared difference test (along with its df).

Nicolas Barreto

unread,
May 23, 2018, 7:28:00 PM5/23/18
to lav...@googlegroups.com
Terrence, thank you so much for all your help, i am sorry for all the questions. 
 
Q1) is the minimum test statistic being non-significant now suggest that the model fits better keeping the groups separated?

The test statistic for a model is testing whether that model fits as well as a saturated model (i.e., freely estimating all possible means and (co)variances).  It is not comparing that model to any other restricted/hypothesized model.

Q3) how do i go about determining the df for that chi-square? my guess is # difference scores - 1...but i am not sure

The df for the test is listed with the test statistic. In order to test a particular hypothesis, you need to specify a model under which the null hypothesis is true (e.g., constrain differences to be equal, implying linearity) and a model under which the null is false (i.e., without the constraint), then compare those models using the anova() function, which returns a chi-squared difference test (along with its df).

Ah yes, that makes sense. My goal at this stage is to determine if the mean difference score at each time point is different between group 1 and group 2. So just to confirm that i have the logic right there are four possible versions of the constraints on the means (see below) and i would use the anova() command to compare between then (though the minimum test statistic would compare all of the models to free estimation). So my question is; 

Q1) a significant minimum test statistic means that a given model is significantly different from free estimation of everything, which means that there is evidence that that constraint is not accurate (so if i constrained between the groups and it was significant then the groups should be different). Is that correct?

free estimation 
#means;
ch.tnf2~1 
ch.tnf3~1
ch.tnf4~1

Constrianed by time (T1 for group1 and group2 forced to be the same etc.)
#means;
ch.tnf2~a*1 
ch.tnf3~b*1
ch.tnf4~c*1

constrained by group 
#means;
ch.tnf2~ c(a,b)*1 
ch.tnf3~ c(a,b)*1
ch.tnf4~ c(a,b)*1

Complete constraint
#means;
ch.tnf2~ m*1 
ch.tnf3~ m*1
ch.tnf4~ m*1




Nicolas Barreto, MPH
Doctoral Student, Applied Social Psychology
Department of Behavioral and Organizational Science
Claremont Graduate University

Terrence Jorgensen

unread,
Jun 2, 2018, 9:49:17 AM6/2/18
to lavaan
Q1) a significant minimum test statistic means that a given model is significantly different from free estimation of everything, which means that there is evidence that that constraint is not accurate (so if i constrained between the groups and it was significant then the groups should be different). Is that correct?

If the models are nested, the null hypothesis is that the more restricted model is correct, so the less restricted model estimates additional parameters that can be fixed/equated.  As in any other NHST scenario, a significant test statistic implies you should reject the null.

Nicolas Barreto

unread,
Jun 4, 2018, 11:33:39 AM6/4/18
to lav...@googlegroups.com
Excellent. 

Thank you again for all the help. You have been extremely helpful. 

Best,
Nic

Nicolas Barreto, MPH
Doctoral Student, Applied Social Psychology
Department of Behavioral and Organizational Science
Claremont Graduate University

--
Reply all
Reply to author
Forward
0 new messages