graphing different years in the same figure

For questions regarding programming in the EViews programming language.

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

trymok
Posts: 7
Joined: Fri Jun 14, 2019 1:02 am

graphing different years in the same figure

Postby trymok » Wed Sep 18, 2019 12:14 am

Hi,

I would like to make the following graph in Eviews, but I haven't figured out how to stack the different graphs (which contains monthly data for each year) in the same figure.
[img]
omsetningstid_bolig.JPG
Picture of the graph I want to make
omsetningstid_bolig.JPG (50.14 KiB) Viewed 3035 times
[/img]

Until now I have done something like this, but I don't know how to get further.

Code: Select all

'making one variable for each year smpl 2015 2015 genr rsliggetid_en2015 = rsliggetid_en smpl @all if @year=2016 genr rsliggetid_en2016 = rsliggetid_en smpl @all if @year=2017 genr rsliggetid_en2017 = rsliggetid_en smpl @all if @year=2018 genr rsliggetid_en2018 = rsliggetid_en smpl @all if @year=2019 genr rsliggetid_en2019 = rsliggetid_en

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

Re: graphing different years in the same figure

Postby EViews Gareth » Wed Sep 18, 2019 3:35 am

You'll have to use lags to line them all up.

Something like:

Code: Select all

smpl 2019 2019 series x_2018 = x(-12) series x_2017 = x(-24) series x_2016 = x(-36)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests