Here is some material I wrote up, on the setting up of a 3 equation new Keynesian model with a stochastic trend that can be estimated with ML or Bayesian methods. I also attach the dynare (version 4) code and data. The draft is not particularly polished, but I think it will be useful for people beginning to derive and estimate these models. And please let me know if you find any mistakes or typos.
cheers
reuben