Factor analysis models get pretty involved. There was a thread a few days ago with someone setting one up: Help with factor analysis (latent variable model) . It sounds like everything got worked out, and the code is pretty clean and well commented, so I’d recommend you have a look there and see if it gives you some clues on how to goo about building your model.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Help with factor analysis (latent variable model) | 22 | 5450 | June 11, 2018 | |
| Sparse sampling for a Cholesky correlation matrix (or modelling correlations among some, but not all parameters) | 15 | 1403 | February 1, 2019 | |
| Chain stuck in a small range after switching a parameter vector to matrix | 2 | 706 | February 5, 2019 | |
| Issues with cholesky_factor_corr Matrices: Estimated as 1 During Model Fitting, Exceeding [-1,1] in Predictive Sampling | 2 | 77 | February 11, 2025 | |
| Draws from Confirmatory Factor Analysis with covariance for measured variables are all NaNs or constant values for some chains | 2 | 482 | September 3, 2023 |