Creating CI in Eviews bug

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

idomen
Posts: 10
Joined: Tue Apr 23, 2019 6:16 am

Creating CI in Eviews bug

Postby idomen » Fri Oct 18, 2019 9:23 pm

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
Attachments
graph3.png
graph.1
graph3.png (5.8 KiB) Viewed 7401 times
graph2.png
graph.2
graph2.png (6.12 KiB) Viewed 7401 times
graph1.png
graph.3
graph1.png (6.9 KiB) Viewed 7401 times

EViews Matt
EViews Developer
Posts: 583
Joined: Thu Apr 25, 2013 7:48 pm

Re: Creating CI in Eviews bug

Postby EViews Matt » Mon Oct 21, 2019 1:44 pm

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_*.

idomen
Posts: 10
Joined: Tue Apr 23, 2019 6:16 am

Re: Creating CI in Eviews bug

Postby idomen » Tue Oct 22, 2019 6:12 pm

Do you refer to this code line " graph imp_rr lb_r rr_impulse ub_r" ?

The prefix is rr not f1r.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Creating CI in Eviews bug

Postby EViews Gareth » Tue Oct 22, 2019 6:37 pm

Go through your code line by line

EViews Matt
EViews Developer
Posts: 583
Joined: Thu Apr 25, 2013 7:48 pm

Re: Creating CI in Eviews bug

Postby EViews Matt » Wed Oct 23, 2019 9:03 am

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)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests