Confidence Interval of Matheson-Stavrev EL (2013)

Discussion of State Space and Dynamic Stochastic General Equilibrium Models
bok1234
Posts: 86
Joined: Tue Jan 11, 2011 8:14 pm

Confidence Interval of Matheson-Stavrev EL (2013)

Unread post by bok1234 »

Dear Mr.Doan,

I thank you again for coding of Matheson-Stavrev EL (2013).
Let me ask some more about this.
I want to draw '+/- one standard confidence intervals' for theta, kappa, and gamma.
For example, the Kalman filter results in "Inflation Targeting: a Victim of Its Own Success? (Christian Gillitzer and John Simon, Reserve Bank of Australia, 2015)" includes those estimates with confidence intevals. To do this job, do I need some kind of procedure like montevar.src, or just add some strings in ekfexample.rpf?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Confidence Interval of Matheson-Stavrev EL (2013)

Unread post by TomDoan »

I don't see anything in that paper that describes the source of the confidence intervals. For a state-space model, that requires Gibbs sampling and is much more complicated than simply draws from the posterior as in montevar. I'm assuming that without any further information, they're just looking at the Kalman smoothed estimates of the standard deviations and converting them into confidence bands (truncated to the constraint).
bok1234
Posts: 86
Joined: Tue Jan 11, 2011 8:14 pm

Re: Confidence Interval of Matheson-Stavrev EL (2013)

Unread post by bok1234 »

Yes. I just want to draw that kind of C.I. in estimates of theta, gamma, and kappa.
Please see pp.10~11. Weird thing is the widths of confidence intervals is variable - for example, the width of C.I. of theta (p.10) seems to get smaller around 1973, and larger before and after that year. Anyway, how could I add this C.I. to your 3 estimates? Some codes in User Guide as below could be a hint?

dlm(a=1.0,c=1.0,sv=15099.0,sw=1469.1,y=nile,presample=diffuse,$
type=smooth) / xstates vstates
set a = %scalar(xstates)
set p = %scalar(vstates)
set lower = a+sqrt(p)*%invnormal(.05)
set upper = a+sqrt(p)*%invnormal(.95)
graph(footer=$
"Figure 1. Smoothed state and 90% confidence intervals") 4
# nile
# a
# lower / 3
# upper / 3
Attachments
Inflation Targeting A Victim of Its Own Success(2015).pdf
(932.99 KiB) Downloaded 790 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Confidence Interval of Matheson-Stavrev EL (2013)

Unread post by TomDoan »

I'm assuming they're doing effectively what's shown in that example. Kalman smoothed estimates will always have wider confidence intervals near the beginning and end of the sample. Where they are narrowest will depend upon the complete model.
bok1234
Posts: 86
Joined: Tue Jan 11, 2011 8:14 pm

Re: Confidence Interval of Matheson-Stavrev EL (2013)

Unread post by bok1234 »

Dear Mr. Doan,
I added ‘confidence interval’ code lines to your program. Please check 3 state varibles’ 95% Confidence Interval codes at the attached RATS program and the output (pdf). I just want to know whether these are right coding and output.
Last edited by bok1234 on Thu Jul 13, 2017 7:21 pm, edited 1 time in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Confidence Interval of Matheson-Stavrev EL (2013)

Unread post by TomDoan »

That looks correct. Note that that's filtered, not smoothed.
bok1234
Posts: 86
Joined: Tue Jan 11, 2011 8:14 pm

Re: Confidence Interval of Matheson-Stavrev EL (2013)

Unread post by bok1234 »

Right.smoothed ones seem to be more beautiful.
Thank you.
Post Reply