# How to estimate structural invariance?

143 views

### Aron Lindberg

Jan 17, 2019, 4:05:24 PM1/17/19
to lavaan
Hi,

I'm trying to estimate structural invariance in lavaan. In particular I'm interested in seeing if the following variables differ across groups:

* slope (intercept of .s)
* variance (variance of .s)
* covariate coefficients

How can I do this?

I've created a reproducible example here:
https://stats.stackexchange.com/questions/384649/estimating-structural-invariance-across-groups-in-lavaan

Any advice or pointers will be much appreciated!

Best,
Aron

### Terrence Jorgensen

Jan 25, 2019, 9:24:46 AM1/25/19
to lavaan
I'm trying to estimate structural invariance in lavaan.

You mean "test" structural invariance, or simply impose those constraints?  You can do it the same way as with measurement invariance: apply the same label to the parameters you want to constrain to equality.

If you want to use the "group.equal=" shortcut, the latent parameters are chosen with the keywords "lv.variances", "lv.covariances", and "means"

`?lavOptions`

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

### Aron Lindberg

Jan 25, 2019, 10:54:24 AM1/25/19
to lavaan
Thanks Terrence, that is really helpful. If I wanted to test if the slope is different across two groups, and if the variance of the slope is different across two groups, which option would I use?

### Terrence Jorgensen

Jan 25, 2019, 11:01:50 AM1/25/19
to lavaan
The latent slope is a latent factor, so you are talking about constraining its mean and/or variance, using the options I indicated.

### Aron Lindberg

Jan 25, 2019, 11:10:10 AM1/25/19
Thanks! So If I use group.equal=means, will that constrain only the mean of the latent slope, or several parameters, given that "means" is plural?

--
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/mGCBdK4Hxzo/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.

--
Aron Lindberg

cell: +1 216 924 7819
skype: aronlindberg

### Aron Lindberg

Jan 25, 2019, 2:25:22 PM1/25/19
to lavaan
P.S. Based on this: https://stackoverflow.com/questions/52937569/understanding-degrees-of-freedom-in-lavaan

it seems as if group.equal="means" or "lv.variances" will constrain either the means or the latent variances of both i and s. What if I just want to constrain either i or s?

On Friday, January 25, 2019 at 11:10:10 AM UTC-5, Aron Lindberg wrote:
Thanks! So If I use group.equal=means, will that constrain only the mean of the latent slope, or several parameters, given that "means" is plural?

On Fri, Jan 25, 2019 at 11:01 AM Terrence Jorgensen <tjorge...@gmail.com> wrote:
The latent slope is a latent factor, so you are talking about constraining its mean and/or variance, using the options I indicated.

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

--
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/mGCBdK4Hxzo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+unsubscribe@googlegroups.com.

To post to this group, send email to lav...@googlegroups.com.

### Terrence Jorgensen

Jan 26, 2019, 7:47:12 AM1/26/19
to lavaan
So If I use group.equal=means, will that constrain only the mean of the latent slope, or several parameters, given that "means" is plural?....
it seems as if group.equal="means" or "lv.variances" will constrain either the means or the latent variances of both i and s

As explained in the help pages I linked to, the group.equal= argument will constrain all of a certain type of parameter, so "means" will constrain the means of both latent growth factors.  If you want to constrain just the slope, you can assign the same to both groups.

`s ~ c(M.slope, M.slope)*1`

### Aron Lindberg

Jan 29, 2019, 3:37:54 PM1/29/19
to lavaan
That's helpful! How can I constrain just the variance of the slope? I've formalized the question here:

### Terrence Jorgensen

Jan 30, 2019, 4:51:15 AM1/30/19
to lavaan
How can I constrain just the variance of the slope?

### Aron Lindberg

Feb 1, 2019, 9:13:21 PM2/1/19
to lavaan
I've gone through this page, and maybe it's implied, but as far as I can tell, it is not spelled out there. If you know, on the top of your head, how to do it, that would be really helpful!

### Terrence Jorgensen

Feb 2, 2019, 10:02:47 AM2/2/19
to lavaan
How can I constrain just the variance of the slope?

(co)variances are specified with a double-tilde:  http://lavaan.ugent.be/tutorial/syntax1.html

Labels work the same way for any type of parameter:  http://lavaan.ugent.be/tutorial/groups.html

`variable ~~ c(label, label)*variable`