Predictive likelihood in Factor analysis

Welcome to the Stan community

As couple of comments/questions about your model, if Z have K columns, specifying it as normal() would mean that the K factors are uncorrelated, which is usually is hard to argue theoretically.

If you are working with CFA, or another form of constraint model, I wrote I full example in this thread
https://discourse.mc-stan.org/t/non-convergence-of-latent-variable-model/12450/13?u=mauricio_garnier-villarre

Working with factor models, there is an issue of which is the correct log-likelihood. Because the estimation method that includes the data augmentation for the latent factors, ends up in using the conditional log-likelihood. While the desirable one is the marginal log-likelihood, which excludes the estimated factor scores

Merkle, E C, D Furr, and S Rabe-Hesketh. “Bayesian Model Assessment: Use of Conditional vs Marginal Likelihoods,” n.d., 25.

The example I posted, run with data augmentation for the latent factor scores that are correlated. But the log likelihood is the marginal. You could use the parameters from the train data, and estimate the log-likelihood for the test data.

Is this the type of model you are looking at?

2 Likes