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.
bbbales2
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Help with factor analysis (latent variable model) | 22 | 5467 | June 11, 2018 | |
| Sparse sampling for a Cholesky correlation matrix (or modelling correlations among some, but not all parameters) | 15 | 1412 | February 1, 2019 | |
| Chain stuck in a small range after switching a parameter vector to matrix | 2 | 708 | February 5, 2019 | |
| Issues with cholesky_factor_corr Matrices: Estimated as 1 During Model Fitting, Exceeding [-1,1] in Predictive Sampling | 2 | 79 | February 11, 2025 | |
| Draws from Confirmatory Factor Analysis with covariance for measured variables are all NaNs or constant values for some chains | 2 | 488 | September 3, 2023 |