Multiple-group latent change score model

158 views
Skip to first unread message

Patrick Forscher

unread,
Aug 30, 2018, 5:41:31 PM8/30/18
to lavaan
I'm trying to fit a multiple-group Latent Change Score Model (see https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4259494/).  I have successfully fit a Latent Change Score Model and double-checked my results against this app (https://ajtorgesen.shinyapps.io/LGMComp/), so I'm fairly sure my basic syntax is correct.

However, when I try to fit a multiple-group version of the Latent Change Score Model, it appears that the equality constraints required to fit the model are only applied to one group and not the other -- i.e., in the model, below, the labels "Ve" and "Beta" are implemented for only one group, but not the other. See below.

Anyone know what's going on?  Is this a known issue when using the "group" argument in lavaan?



BEGIN CODE SNIPPET

m <- '
lv1 =~ 1*muslim_1
lv2 =~ 1*muslim_2
lv3 =~ 1*muslim_3
lv4 =~ 1*muslim_4
lv5 =~ 1*muslim_5
lv6 =~ 1*muslim_6
lv7 =~ 1*muslim_7
lv2 ~ 1*lv1
lv3 ~ 1*lv2
lv4 ~ 1*lv3
lv5 ~ 1*lv4
lv6 ~ 1*lv5
lv7 ~ 1*lv6
ld2 =~ 1*lv2
ld3 =~ 1*lv3
ld4 =~ 1*lv4
ld5 =~ 1*lv5
ld6 =~ 1*lv6
ld7 =~ 1*lv7
ld2 ~ Beta*lv2
ld3 ~ Beta*lv3
ld4 ~ Beta*lv4
ld5 ~ Beta*lv5
ld6 ~ Beta*lv6
ld7 ~ Beta*lv7
B1 =~ 1*ld2 + 1*ld3 + 1*ld4 + 1*ld5 + 1*ld6 + 1*ld7
B0 =~ 1*lv1
B0 ~~ B0
B1 ~~ B1
B0 ~~ B1
B0 ~ 1
B1 ~ 1
muslim_1 ~~ Ve*muslim_1
muslim_2 ~~ Ve*muslim_2
muslim_3 ~~ Ve*muslim_3
muslim_4 ~~ Ve*muslim_4
muslim_5 ~~ Ve*muslim_5
muslim_6 ~~ Ve*muslim_6
muslim_7 ~~ Ve*muslim_7'

fit <- lavaan(m, data=d, group="condition")
summary(fit)

Group 1 [ST]:

  ld2 ~                                               
    lv2     (Beta)   -0.986    0.194   -5.092    0.000
  ld3 ~                                               
    lv3     (Beta)   -0.986    0.194   -5.092    0.000
  ld4 ~                                               
    lv4     (Beta)   -0.986    0.194   -5.092    0.000
  ld5 ~                                               
    lv5     (Beta)   -0.986    0.194   -5.092    0.000
  ld6 ~                                               
    lv6     (Beta)   -0.986    0.194   -5.092    0.000
  ld7 ~                                               
    lv7     (Beta)   -0.986    0.194   -5.092    0.000

   .muslim_1  (Ve)   30.117    2.245   13.416    0.000
   .muslim_2  (Ve)   30.117    2.245   13.416    0.000
   .muslim_3  (Ve)   30.117    2.245   13.416    0.000
   .muslim_4  (Ve)   30.117    2.245   13.416    0.000
   .muslim_5  (Ve)   30.117    2.245   13.416    0.000
   .muslim_6  (Ve)   30.117    2.245   13.416    0.000
   .muslim_7  (Ve)   30.117    2.245   13.416    0.000

Group 2 [CST]:

  ld2 ~                                               
    lv2              -0.246    0.136   -1.804    0.071
  ld3 ~                                               
    lv3              -0.275    0.138   -1.994    0.046
  ld4 ~                                               
    lv4              -0.258    0.138   -1.872    0.061
  ld5 ~                                               
    lv5              -0.238    0.136   -1.751    0.080
  ld6 ~                                               
    lv6              -0.269    0.137   -1.964    0.049
  ld7 ~                                               
    lv7              -0.264    0.138   -1.919    0.055

   .muslim_1        140.628   33.796    4.161    0.000
   .muslim_2         33.625   10.114    3.325    0.001
   .muslim_3         18.438    5.191    3.552    0.000
   .muslim_4         20.105    4.696    4.281    0.000
   .muslim_5         32.292    7.024    4.597    0.000
   .muslim_6         13.042    3.851    3.386    0.001
   .muslim_7          7.834    4.134    1.895    0.058

Ahabsfriend

unread,
Aug 31, 2018, 3:22:42 AM8/31/18
to lavaan
Hello, 

to fit a multi-group model, I would use the syntax. First, in doing so, you have the full control. My experience: It is also clearer for others to specify the syntax rather then using the function options.

In your case, you only have to change the syntax as follows to establish equality constraints for both groups.

...

ld2 ~ c(Beta,Beta)*lv2

...

muslim_1 ~~ c(Ve,Ve)*muslim_1

...


Best regards

Patrick Forscher

unread,
Aug 31, 2018, 4:33:56 PM8/31/18
to lavaan
Thanks for your reply.  My problem is actually that, for group 1, the equality constraints across timepoints that I placed in my model declaration are respected, but they are not respected for group 2.  This is why I think there might be a subtle bug in how lavaan handles equality constraints within groups in multiple-group SEM.  See below.

Group 1


   .muslim_1  (Ve)   30.117    2.245   13.416    0.000
   .muslim_2  (Ve)   30.117    2.245   13.416    0.000
   .muslim_3  (Ve)   30.117    2.245   13.416    0.000
   .muslim_4  (Ve)   30.117    2.245   13.416    0.000
   .muslim_5  (Ve)   30.117    2.245   13.416    0.000
   .muslim_6  (Ve)   30.117    2.245   13.416    0.000
   .muslim_7  (Ve)   30.117    2.245   13.416    0.000

Group 2

Manuel Torres Sahli

unread,
Sep 1, 2018, 12:58:08 AM9/1/18
to lavaan
Dear Patrick,

I think what AhabsFriend was pointing out is that labels are group-specific. So you need to specify one label per group:


m <- '
lv1 =~ 1*muslim_1
lv2 =~ 1*muslim_2
lv3 =~ 1*muslim_3
lv4 =~ 1*muslim_4
lv5 =~ 1*muslim_5
lv6 =~ 1*muslim_6
lv7 =~ 1*muslim_7
lv2 ~ 1*lv1
lv3 ~ 1*lv2
lv4 ~ 1*lv3
lv5 ~ 1*lv4
lv6 ~ 1*lv5
lv7 ~ 1*lv6
ld2 =~ 1*lv2
ld3 =~ 1*lv3
ld4 =~ 1*lv4
ld5 =~ 1*lv5
ld6 =~ 1*lv6
ld7 =~ 1*lv7
ld2 ~ c(Beta1, Beta2)*lv2
ld3 ~ c(Beta1, Beta2)*lv3
ld4 ~ c(Beta1, Beta2)*lv4
ld5 ~ c(Beta1, Beta2)*lv5
ld6 ~ c(Beta1, Beta2)*lv6
ld7 ~ c(Beta1, Beta2)*lv7
B1 =~ 1*ld2 + 1*ld3 + 1*ld4 + 1*ld5 + 1*ld6 + 1*ld7
B0 =~ 1*lv1
B0 ~~ B0
B1 ~~ B1
B0 ~~ B1
B0 ~ 1
B1 ~ 1
muslim_1 ~~ c(Ve1, Ve2)*muslim_1
muslim_2 ~~ c(Ve1, Ve2)*muslim_2
muslim_3 ~~ c(Ve1, Ve2)*muslim_3
muslim_4 ~~ c(Ve1, Ve2)*muslim_4
muslim_5 ~~ c(Ve1, Ve2)*muslim_5
muslim_6 ~~ c(Ve1, Ve2)*muslim_6
muslim_7 ~~ c(Ve1, Ve2)*muslim_7'

You may also use just the unnumbered original label for both groups to contrain equality if you need to. Or explicitly type:

Ve1 == Ve2
Beta1 == Beta2

Best,
Manuel
Reply all
Reply to author
Forward
0 new messages