Page 1 of 1

graphing different years in the same figure

Posted: Wed Sep 18, 2019 12:14 am
by trymok
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 3037 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

Re: graphing different years in the same figure

Posted: Wed Sep 18, 2019 3:35 am
by EViews Gareth
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)