Now you have one latent variable with both boys' and girls' items as indicators. If you combine this into one analysis, you'll have a lot of missing data in these items (about 50% for each, presumably). One might try experimenting with such a single model (adding gender as a covariate in the model), but I would not recommend that you use this approach.
A group-based model makes less sense (one model, two groups).
However, the reason I asked the original question was that I keep encountering published articles that used the full sample, generating a single regression coefficient (delinquency ~ puberty) for the entire sample (without dividing into boys and girls).
## unconstrained, configural invariance
mod.config <- '
group: boy # or group: 1, use whatever your variable labels are
#measurement model
puberty.b =~ armhair + facehair + voice (# This is for boys' pubertal status)
delinquency=~ delinquency1 + delinquency2 + delinquency3
#structural model
delinquency ~ boy.slope*puberty.b
group: girl # or group: 2, use whatever your variable labels are
#measurement model
puberty.g =~ breast + body + menarche + selfreport (#This is for girls' pubertal status)
delinquency =~ delinquency1 + delinquency2 + delinquency3
#structural model
delinquency ~ girl.slope*puberty.g
'
## add metric-invariance constraints
mod.metric <- '
group: boy # or group: 1, use whatever your variable labels are
#measurement model
puberty.b =~ armhair + facehair + voice (# This is for boys' pubertal status)
delinquency =~ L1*delinquency1 + L2*delinquency2 + L3*delinquency3
delinquency ~~ NA*delinquency # fixing to 1 no longer need for identification
#structural model
delinquency ~ boy.slope*puberty.b
group: girl # or group: 2, use whatever your variable labels are
#measurement model
puberty.g =~ breast + body + menarche + selfreport (#This is for girls' pubertal status)
delinquency =~ L1*delinquency1 + L2*delinquency2 + L3*delinquency3
#structural model
delinquency ~ girl.slope*puberty.g
'
## specify equality constraint to test
sameSlope <- ' girl.slope == boy.slope '
## fit models
fit.config <- cfa(mod.config, data = myData, std.lv = TRUE, group = "sex")
fit.metric <- cfa(mod.metric, data = myData, std.lv = TRUE, group = "sex")
## does H0 of metric invariance hold?
anova(fit.config, fit.metric)
## If so, you can test the H0 that the slopes are equal
fit.sameSlope <- update(fit.metric, constraints = sameSlope)
anova(fit.metric, fit.sameSlope)I experimented with a single model, as you mentioned, and the coefficient is not quite different from those from the separate models.