In multiple group LGC model, how do I constrain residual variances of mani. vars within each group?

43 views
Skip to first unread message

Craig Van Pay

unread,
Jun 10, 2019, 2:06:17 PM6/10/19
to lavaan
Hello,

I am using Lavaan 0.6-4.1411 and building up a LGC, and I want to constrain residual variance within each group across the manifest variables, but I cannot figure out how to do so. When using group.equal in my growth( ) function, it constrains them, but gives each group the same estimate. Can I have Lavaan estimate constrained residuals for each group?

Model specification:

# mean latent intercept and constrained residual variances
growth.model1 <- '
       # intercept
         i =~ 1*TVIPR_1 + 1*TVIPR_2 + 1*TVIPR_3
         i~~0*i
       # residual variances
         TVIPR_1~~r*TVIPR_1
         TVIPR_2~~r*TVIPR_2
         TVIPR_3~~r*TVIPR_3
'

Output without group.equal( ):

Group 1
Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
    i                 0.000                           
   .TVIPR_1    (r)  238.593   18.254   13.071    0.000
   .TVIPR_2    (r)  238.593   18.254   13.071    0.000
   .TVIPR_3    (r)  238.593   18.254   13.071    0.000

Group 2

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
    i                 0.000                           
   .TVIPR_1         134.251   17.666    7.599    0.000
   .TVIPR_2         233.083   67.010    3.478    0.001
   .TVIPR_3         440.732   41.172   10.705    0.000


Output with group.equal( ):

Group 1

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
    i                 0.000                           
   .TVIPR_1    (r)  247.827   15.819   15.666    0.000
   .TVIPR_2    (r)  247.827   15.819   15.666    0.000
   .TVIPR_3    (r)  247.827   15.819   15.666    0.000

Group 2

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)
    i                 0.000                           
   .TVIPR_1    (r)  247.827   15.819   15.666    0.000
   .TVIPR_2    (r)  247.827   15.819   15.666    0.000
   .TVIPR_3    (r)  247.827   15.819   15.666    0.000

Notice how it only constrains the first group, and then both at the same.

Thanks!

Craig

Christopher David Desjardins

unread,
Jun 10, 2019, 2:12:47 PM6/10/19
to lavaan

pre-multiply:

Demo.growth$group <- rep(c("1", "2"), each = 200)
model.syntax <- '
  # intercept and slope with fixed coefficients
    i =~ 1*t1 + 1*t2 + 1*t3 + 1*t4
    i ~~ 0*i

  # time-varying covariates
    t1 ~~ c("p1", "p2")*t1
    t2 ~~ c("p1", "p2")*t2
    t3 ~~ c("p1", "p2")*t3
    t4 ~~ c("p1", "p2")*t4
'
fit <- growth(model.syntax, group = "group", data=Demo.growth)
summary(fit)

--
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 post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/ff2525b3-d4a1-4481-a45f-1dfb101e618a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Craig Van Pay

unread,
Jun 10, 2019, 4:11:18 PM6/10/19
to lavaan
Wow, that's easy enough, thanks Christopher!
To unsubscribe from this group and stop receiving emails from it, send an email to lav...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages