Bayesian structural equation modeling for data from multiple cohorts