Constraining a parameter to equality across groups can be accomplished by giving them the same label:
https://lavaan.ugent.be/tutorial/groups.html
To ensure you are constraining the correlation (not unstandardized covariance), it is easiest if you fit the multigroup cfa()
using the argument std.lv=TRUE
, so that the factor variances are fixed to 1 for identification. That means the estimated factor covariances are correlations.
Providing your syntax when you post a question like this would allow responders to provide an exact solution. Here is an example using the data from the ?cfa
help page:
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9
visual ~~ c(cor.vt, cor.vt)*textual
visual ~~ c(cor.vs, cor.vs)*speed
textual ~~ c(cor.ts, cor.ts)*speed
'
fit <- cfa(HS.model, data = HolzingerSwineford1939,
group = "school", std.lv = TRUE)
## notice identical correlation estimates for 2 groups
summary(fit)