A question about estimating DSGE model with Bayesian method

hi!
I saw many papers compare the actual and the fitted data ,like CMR 2009 “financial factor in economic fluctuation” ,it says"the similarity between raw data and the model predicted in data in figure 3a and 3b suggests that we have a nearly exact linear decomposition of the historical data into economic shocks "
I want to know how does the author plot this kind of graph ,a command in dynare? and what the meaning of doing this? thank you so much!

The Kalman smoother decomposes the observables exactly into the structural shocks. That is what the shock_decomposition command does. What is different in CMR 2009 is the presence of measurement error. This drives a wedge between the observed data and the one implied by the structural shocks.

thanks!it’s really helpful .and I want to learn the analyzation of the dsge model after bayesian estimation ,like model fit and things most researchers will do .can you recommend some materials for me to learn? thanks !

Unfortunately, there is no good textbook on this. You should check the mode_check-plots, the MCMC convergence diagnostics, the parameter trace_plots, and the output graphs from the Kalman smoother.