Page 1 of 1

Creating CI in Eviews bug

Posted: Fri Oct 18, 2019 9:23 pm
by idomen
I am running the following code to create confidence intervals, but results are awkward. The first graph is correct, but the rest wrong, although I replicated the code.

'generate 68% CI based on t distribution for imp of f1, gdp and r.
genr ub_f=f1r_impulse+1.134*f1r_impulse_se/@sqrt(6)
genr lb_f=f1r_impulse-1.134*f1r_impulse_se/@sqrt(6)
genr ub_y=yr_impulse+1.134*yr_impulse_se/@sqrt(6)
genr lb_y=yr_impulse-1.134*yr_impulse_se/@sqrt(6)
genr ub_r=f1r_impulse+1.134*f1r_impulse_se/@sqrt(6)
genr lb_r=f1r_impulse-1.134*f1r_impulse_se/@sqrt(6)

smpl @last-!imp_periods+1 @last

'------------------------------------------------------------------------------------------------
'DIAGRAM 1
'-----------------------------------------------------------------------------------------------

'diag.1 graph 1
graph imp_fr lb_f f1r_impulse ub_f
imp_fr.setelem(1) linepattern(DASH9) linewidth(1.5) linecolor(@rgb(146,194,218))
imp_fr.options linepat
imp_fr.setelem(2) linepattern(solid) linewidth(1.5) linecolor(@rgb(0, 0, 255))
imp_fr.setelem(3) linepattern(DASH9) linewidth(1.5) linecolor(@rgb(146,194,218))
imp_fr.options linepat
imp_fr.addtext(t) Factor

'diag.1 graph 2
graph imp_yr lb_y yr_impulse ub_y
imp_fr.setelem(1) linepattern(DASH9) linewidth(1.5) linecolor(@rgb(146,194,218))
imp_fr.options linepat
imp_fr.setelem(2) linepattern(solid) linewidth(1.5) linecolor(@rgb(0, 0, 255))
imp_fr.setelem(3) linepattern(DASH9) linewidth(1.5) linecolor(@rgb(146,194,218))
imp_fr.options linepat
imp_fr.addtext(t) y
'diag.1 graph 3
graph imp_rr lb_r rr_impulse ub_r
imp_fr.setelem(1) linepattern(DASH9) linewidth(1.5) linecolor(@rgb(146,194,218))
imp_fr.options linepat
imp_fr.setelem(2) linepattern(solid) linewidth(1.5) linecolor(@rgb(0, 0, 255))
imp_fr.setelem(3) linepattern(DASH9) linewidth(1.5) linecolor(@rgb(146,194,218))
imp_fr.options linepat
imp_fr.addtext(t) SR

Re: Creating CI in Eviews bug

Posted: Mon Oct 21, 2019 1:44 pm
by EViews Matt
Hello,

You appear to have a small copy-and-paste bug. When creating ub_r and lb_r I suspect you forgot to change the right-hand side variables from prefix f1r_* to rr_*.

Re: Creating CI in Eviews bug

Posted: Tue Oct 22, 2019 6:12 pm
by idomen
Do you refer to this code line " graph imp_rr lb_r rr_impulse ub_r" ?

The prefix is rr not f1r.

Re: Creating CI in Eviews bug

Posted: Tue Oct 22, 2019 6:37 pm
by EViews Gareth
Go through your code line by line

Re: Creating CI in Eviews bug

Posted: Wed Oct 23, 2019 9:03 am
by EViews Matt
I mean when you create ub_r and lb_r.

Code: Select all

genr ub_r=f1r_impulse+1.134*f1r_impulse_se/@sqrt(6) genr lb_r=f1r_impulse-1.134*f1r_impulse_se/@sqrt(6)