Bayesian estimation problem in DSGE model

If the steady state of the model is not calculated in “initval” but is calculated by a separate m file, how can the “initval” module be changed to the “steady_state_model” module when performing Bayesian estimation

Simply write your own steady state file. See

Of course, you should use the current Dynare version.

Dear professor, I still have some confusion:

Taking the NK_baseline.mod file from Dynare 4.5.6 as an example, currently there is a working NK_baseline.mod and NK_baseline_steadystate.m file. I want to perform Bayesian estimation on the model parameters based on this foundation.

Traditional methods use the “initval” block to calculate the steady state of the model, and when performing Bayesian estimation, the “initval” block must be changed to the “steady_state_model” block. However, if I use the NK_baseline_steadystate.m file to solve for the steady state, there is no “initval” block or “steady_state_model” block in the mod file. If I want to perform Bayesian estimation in this situation, what should I do? Should I add the steady state calculation equation for the observation variables directly into the NK_baseline_steadystate.m file?
NK_baseline.mod (9.4 KB)
NK_baseline_steadystate.m (3.8 KB)

How to perform Bayesian estimation on a DSGE model that uses an m file for steady state calculation?

Here is my idea, please let me know if it is correct:

Add observation variables to the var block;
Add relevant parameters for the observation variable equations to the Parameters block;
Add the observation variable equation to the model block;
Add the observation variable steady state calculation equation to the m file;
Add an estimated_params block;
Add the varobs command;
Change the Stoch_simul command to estimation.

Thank you!

Dynare will automatically call the steady state file if it follows the correct naming convention. It obviates the need for any initval-block.