Page 1 of 1

stacked bar graph across countries

Posted: Tue Jan 26, 2016 3:05 am
by tvonbrasch
Hi

I am trying to decompose changes in income across countries. I have made the graph i want in excel (see below), but I do not know how to make it in Eviews

the data is both in the attached excel file and in the attached Eviews workfile. How do you you make a stacked bar graph like this in Eviews?

Thomas

decomp_g.pdf
(89.26 KiB) Downloaded 274 times

Re: stacked bar graph across countries

Posted: Tue Jan 26, 2016 7:44 am
by EViews Gareth
Workfile didn't contain any data.

But just open up the Excel file in EViews, then open up the five series as a group. View->Graph->Bar. Select Multiple Series: Stack in single graph. Switch to the Graph Elements->Bar-Area-Pie page and select "Stack positive and negative values separately".

Re: stacked bar graph across countries

Posted: Tue Jan 26, 2016 10:49 am
by tvonbrasch
thanks for this! very useful!

sorry about the data in the workfile, i only copied the groups.

if you look at the attached workfile, the groups
dec_deu
dec_dnk
dec_swe
dec_usa

contains series for the four countries deu, dnk, swe usa.

to create a stacked bar graph as you showed me (say for year=2013), how should i proceed when the workfile is in this time series format?

should i copy the series to a new page to make it consistent with the organisation in the excel format (and if so, how)? or is there a way to generate the stacked bar graph in the current worrkfile?
net_national_income_decomposition.wf1
(84.87 KiB) Downloaded 218 times
thanks again!
Thomas

Re: stacked bar graph across countries

Posted: Tue Jan 26, 2016 11:19 am
by tvonbrasch
i see that i can do the same thing from a matrix

Code: Select all

smpl 2013 2013 vector dnk=@convert(dec_dnk) vector deu=@convert(dec_deu) vector swe=@convert(dec_swe) vector usa=@convert(dec_usa) matrix(4,5) aa rowplace(aa,dnk,1) rowplace(aa,deu,2) rowplace(aa,swe,3) rowplace(aa,usa,4)