For what I understood \Sigma=LL^T+\Psi where L is the matrix of factor loadings with the constrains from @rfarouni blog. In Help with factor analysis (latent variable model) they used multi_normal_cholesky
for the factor scores, not for the factor loadings. The Ld
in their code is the product between the factor scores sd and the factor scores correlation, whereas the L
in my code is the factor loadings, what is defined as lambda
in their code. So you are suggesting to write
model{
multi_normal_cholesky(r + diag_matrix(a) * Y[t-1], L)
}
In this case I don’t know what to do with psi
Or
transformed parameters{
L_s = diag_pre_multiply(psi, L)
}
model {
multi_normal_cholesky(r + diag_matrix(a) * Y[t-1], L_s)
}
But L is not from a correlation matrix
I am sure I am missing something conceptually.
And thanks a lot for your help,
Alfonso