In Born and Pfeifer_2014, A comment AER paper that solve the third order perturbation DSGE model. To plot the IRF, we need the ergodic mean. In their shared code, they do not provide additional convergence check. Is there any idea to conduct this converge check. Since their shared code is special for the parameterization. While implementing the ideas to other codes/model, we cannot guarantee the steady_state is converged.
Just one more question, in the github code you provide in the links, I find that is inconsistent with the language of Dynare version 4.5.6. For instance, options_.irf_opt cannot be recognized. And I also check the dynare manual and find no clue on “irf_opt”. Could you please illustrate?
Those codes belong to a development branch of Dynare that is not yet functional. I linked to the code to show you the general logic. Just simulate a long series and check whether
I figured it is because I add another exogenous shock in the model, but didn’t change the dimension in generate_FGRU_shock.m (It always generates 5 shocks), then in the third-order expansion later on in simult_FGRU.m it will report that dimensions of vectors are inconsistent and cannot be multiplied. Really it’s just something stupid, sorry about your time.
However, I want to ask another question. In FGRU, they estimate the parameters of the stochastic volatility processes using a “Bayesian with particle filter”, is it possible to do this in dynare as well? Here I attached my code trying to do this, suppose I know the data of the two interest rate shocks. Obviously it won’t run successfully, but I really don’t know how should I fix it interestshock.mat (3.1 KB) SV_Bayesian.mod (3.6 KB)
Sorry again professor, I have figured that, when I tried to run Born-Pfeifer (2014)'s code using Dynare 6 in Matlab R2022b, I need basically two changes:
If I choose the standard Andreasen et al. (2013) pruning, I need to add two more inputs in the simult_ function, i.e., change simult_(ergodicmean_no_shocks,oo_.dr,shock_mat,options_.order); to simult_(M_,options_,ergodicmean_no_shocks,oo_.dr,shock_mat,options_.order);
If I want to estimate the targeted parameters by matching the simulated moments, I will need to call the smm_diff_function. Yet the function will firstly run the model solution in dynare, by calling [oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);, this is where matlab reports an error saying “Too many output arguments.”. In fact, the online help file specifies the resol function as [dr, info, params] = resol(check_flag, M_, options_, dr_in, endo_steady_state, exo_steady_state, exo_det_steady_state), so it would take three outputs only. I wonder how should I change the code? Just delete options_,oo_ in the left? Or from reading the help file, I guess a more proper way is to use [oo_.dr,info,M_.params] = resol(0,M_,options_,oo_.dr,oo_.steady_state,oo_.exo_steady_state,oo_.exo_det_steady_state);?