In case it’s at all helpful, I tried (and got stuck) implementing a complex schur decomposition for a Lyapunov solver here: Solve a Lyapunov / Sylvester equation: include custom c++ function using Eigen library -- possible?
I also tried the univariate approach to multivariate filtering before, I may have just gotten something wrong / misunderstood something, but it didn’t work equivalent to the multivariate form, which I concluded was because the likelihood was different – because in the univariate form the likelihood for indicator 3 at time 4 is conditional on the predicted state at time 4, and the observations of indicators 1 and 2 at time 4. Perhaps there is some other way to formulate it, I didn’t push too hard…
ctsem uses an extended kalman filter implemented in stan, a few examples here: https://cdriver.netlify.app/
would be happy to chat about any of this, combine some ideas / work perhaps…