Page 1 of 1

Confidence Interval in IRF

PostPosted: Thu May 09, 2013 5:04 pm
by Muhammad Ali Nasir
Hello

Can we construct a confidence interval around the Impulse Response Function Analysis, I have performed IRF analysis but there is only one line. Please comment.

Regards

Ali

Re: Confidence Interval in IRF

PostPosted: Thu May 09, 2013 6:40 pm
by jpfeifer
For stoch_simul the model is calibrated and there is no uncertainty about the parameters. Thus, the confidence bands are simply 0.

For estimation, Bayesian IRFs will plot HPDIs/Bayesian confidence bands.

Re: Confidence Interval in IRF

PostPosted: Fri May 10, 2013 4:16 pm
by Muhammad Ali Nasir
Thank you very much indeed, as I am also estimating the model could you please advise me how to plot HPDIs/Bayesian confidence bands.

Regards and best wishes

Ali

Re: Confidence Interval in IRF

PostPosted: Fri May 10, 2013 4:35 pm
by jpfeifer
Use the bayesian_irf option. See the manual.

Re: Confidence Interval in IRF

PostPosted: Mon May 13, 2013 8:40 am
by Muhammad Ali Nasir
Hello,

Thanks for reply, actually i used that command following the manual and your kind advise, the irf but still without band around, if you please have look and help me one more time.

Regards and wishes

Ali

Re: Confidence Interval in IRF

PostPosted: Mon May 13, 2013 9:50 am
by jpfeifer
Without running a MCMC (mh_replic=0), there will be no draws from which to compute HPDIs

Re: Confidence Interval in IRF

PostPosted: Tue May 14, 2013 9:16 am
by Muhammad Ali Nasir
Thanks, it almost worked but then I got following error, please help again.

regards (Ali)


??? Error using ==> chol
Matrix must be positive definite.

Error in ==> metropolis_hastings_initialization at 68
d = chol(vv);

Error in ==> random_walk_metropolis_hastings at 69
[ ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck, nruns,
NewFile, MAX_nruns, d ] = ...

Error in ==> dynare_estimation_1 at 909
feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);

Error in ==> dynare_estimation at 70
dynare_estimation_1(var_list,dname);

Error in ==> StockandBond at 404
dynare_estimation(var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;

Re: Confidence Interval in IRF

PostPosted: Tue May 14, 2013 9:19 am
by jpfeifer
Try mode_compute=6 or 9.

Re: Confidence Interval in IRF

PostPosted: Wed May 15, 2013 1:00 pm
by Muhammad Ali Nasir
Thank you very much Pfeiffe. Option 6 . :)

Re: Confidence Interval in IRF

PostPosted: Tue Jun 11, 2013 1:21 am
by JBarnes1961
I was under the impression that IRFs reported for approximations of order 2 (or higher) are average IRFs computed over a number of simulations (the default number is 50 I think). Doesn't this imply that IRFs for order 2 or higher should indeed have confidence intervals/bands? For more info see http://www.dynare.org/DynareWiki/IrFs.

Re: Confidence Interval in IRF

PostPosted: Tue Jun 11, 2013 8:10 am
by jpfeifer
At order > 1 there is still no parameter uncertainty, but rather shock/state uncertainty. I would not necessarily interpret the resulting distribution of IRFs as a confidence interval, but yes, you get a distribution of IRFS.

Re: Confidence Interval in IRF

PostPosted: Tue Jun 11, 2013 8:28 am
by JBarnes1961
Yes, there is definitely not any parameter uncertainty, only state shock uncertainty. Do you know how to access the information necessary to compute these confidence bands from the standard Dynare (or Dynare++) output? I would really like to know. Whenever I see talks where the presenter shows IRFs for a higher order perturbation solution w/o confidence bands it always makes me wonder whether or not zero would fall within such a band.

Re: Confidence Interval in IRF

PostPosted: Tue Jun 11, 2013 9:25 am
by jpfeifer
In Dynare's irf.m you have
Code: Select all
y = y+(y2(:,M_.maximum_lag+drop+1:end)-y1(:,M_.maximum_lag+drop+1:end));

Here the different replications are just added to each other. You would have to change it to get the replications and compute the bands you want. Please keep me updated on the results.