> The problem is that most economic models are forward-looking and solving
> for the coefficients of the ODEs is the nontrivial step, imposed by
> equilibrium conditions, usually done by iterative numerical methods. I
> don't think one can code that in Stan, but I will look into it.
There are two ways of using these models. One is to code up the solver
in Stan and let Stan automatically differentiate through the solver. This
works but tends to be slow. Another is to differentiate the original system
and then figure out how to solve for those derivatives. We do this
automatically for ODEs in Stan, but can be done analytically for all kinds
of systems such as implicit constraints that require root solvers.
> On the other hand, I think can provide a linear approximation to the
> model, and then an approximation of the parameters of that as a function
> of the model parameters, which I believe is good or at least OK.
Then go ahead and try it. But keep in mind that for anything but really simple
models (which wouldn’t then require such complex solvers) these approximations
fail hard pretty quickly.
These are not easy problems — but if your likelihood is a black box
then there’s only much you can do to explore it efficiently. You _have_
to open that box, which is usually a good idea for reproducible science
anyways.