Converge Check on Born/Pfeife(AER2014)

Hi,

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.

Best,
House

We did not add it to the code for the AER, but we checked for convergence. It can easily be implemented as in https://git.dynare.org/JohannesPfeifer/dynare/blob/Andreasen/matlab/IRFS/get_ergodic_mean_no_shocks.m

Dear Professor,

Thanks for the information. It helps.

Best,
House

Dear Professor,

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?

Best,
House

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

   abs_change_EM=max(abs(out_noshock(:,end)-out_noshock(:,end-500)));

is close to 0

Dear Professor,

Thanks for the information. Now I understand the logic.

Best,
House

Dear professor, the replication code for Born-Pfeifer found in Github cannot run in Dynare 6, is there any way to fix it?

Can you provide more details. Which file are you running and what is the error message?

Dear professor,

I have changed to Dynare 4.4.3 and it works for me now. Thank you very much!

But what was the error message/problem in Dynare 6?

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 :smiling_face_with_tear:
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:

  1. 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);

  2. 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);?

I pushed an updated version to Born_Pfeifer_2014/Born_Pfeifer_RM_Comment.mod: compatibility fixes fo… · JohannesPfeifer/DSGE_mod@01907c4 · GitHub

Thank you very much! It is really helpful