Confidence Interval in IRF

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Confidence Interval in IRF

Postby Muhammad Ali Nasir » Thu May 09, 2013 5:04 pm

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
Muhammad Ali Nasir
 
Posts: 22
Joined: Wed Jan 12, 2011 9:30 am
Location: Leeds England

Re: Confidence Interval in IRF

Postby jpfeifer » Thu May 09, 2013 6:40 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Confidence Interval in IRF

Postby Muhammad Ali Nasir » Fri May 10, 2013 4:16 pm

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
Muhammad Ali Nasir
 
Posts: 22
Joined: Wed Jan 12, 2011 9:30 am
Location: Leeds England

Re: Confidence Interval in IRF

Postby jpfeifer » Fri May 10, 2013 4:35 pm

Use the bayesian_irf option. See the manual.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Confidence Interval in IRF

Postby Muhammad Ali Nasir » Mon May 13, 2013 8:40 am

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
Attachments
StockandBond.mod
Model
(8.41 KiB) Downloaded 194 times
BondsandStock.xls
(39.5 KiB) Downloaded 179 times
Muhammad Ali Nasir
 
Posts: 22
Joined: Wed Jan 12, 2011 9:30 am
Location: Leeds England

Re: Confidence Interval in IRF

Postby jpfeifer » Mon May 13, 2013 9:50 am

Without running a MCMC (mh_replic=0), there will be no draws from which to compute HPDIs
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Confidence Interval in IRF

Postby Muhammad Ali Nasir » Tue May 14, 2013 9:16 am

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) ;
Muhammad Ali Nasir
 
Posts: 22
Joined: Wed Jan 12, 2011 9:30 am
Location: Leeds England

Re: Confidence Interval in IRF

Postby jpfeifer » Tue May 14, 2013 9:19 am

Try mode_compute=6 or 9.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Confidence Interval in IRF

Postby Muhammad Ali Nasir » Wed May 15, 2013 1:00 pm

Thank you very much Pfeiffe. Option 6 . :)
Muhammad Ali Nasir
 
Posts: 22
Joined: Wed Jan 12, 2011 9:30 am
Location: Leeds England

Re: Confidence Interval in IRF

Postby JBarnes1961 » Tue Jun 11, 2013 1:21 am

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.
JBarnes1961
 
Posts: 3
Joined: Sat Feb 16, 2013 10:33 pm

Re: Confidence Interval in IRF

Postby jpfeifer » Tue Jun 11, 2013 8:10 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Confidence Interval in IRF

Postby JBarnes1961 » Tue Jun 11, 2013 8:28 am

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.
JBarnes1961
 
Posts: 3
Joined: Sat Feb 16, 2013 10:33 pm

Re: Confidence Interval in IRF

Postby jpfeifer » Tue Jun 11, 2013 9:25 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests