Use multi_normal_cholesky
directly since you have L
and psi
. See the above discussion at Help with factor analysis (latent variable model) or search the manual for cholesky parameterization. You can also set the lagged Y in transformed data and have a vectorized call to the multi_normal_cholesky.