Page 1 of 1

Graphing aggregate data from all cross-sections

Posted: Tue May 11, 2010 7:22 am
by tchaithonov
Hi Guys,

I have created some time series graphs out of a panel data (same variable, using "graph {%graph_name}.line(panel=i) ..."), and I am trying to make an aggregate line graph out of it. I need to add up, week-by-week, the values of the variable, and chart them. I could think of a matrix solution (so that I don't need to maintain the panel structure), but it wouldn't have the time series associating to the data points, but I can't find the graph console function from the manual. Another way is to create a new ts page and copy the data over there, matching only the @dateid and sum it up, but it would be a bit cumbersome if I have to run the program several times with a new page created each time it is run. So, is there any other way I should try? Please let me know. Thanks.

Tchaithonov

Re: Graphing aggregate data from all cross-sections

Posted: Tue May 11, 2010 7:59 am
by EViews Gareth
Aren't you just saying you want to stack (panel=stack) the cross-sections?

Re: Graphing aggregate data from all cross-sections

Posted: Tue May 11, 2010 8:13 am
by tchaithonov
Hey Gareth, I think it should be similar to mean plus sd bounds but instead of mean, I want sum. Does that make sense to you?

Re: Graphing aggregate data from all cross-sections

Posted: Tue May 11, 2010 8:23 am
by EViews Gareth
Sorry, yeah, I wasn't thinking properly when I read your original post. I don't think there is a way to get the sum like that automatically in a graph. As you said, you could copy the series into a new page, or you could create a new series in your current page that is equal to the sums, then graph that:

Code: Select all

series ysum = @sumsby(y,@cellid)
where Y is the series you're interested in graphing.

Re: Graphing aggregate data from all cross-sections

Posted: Tue May 11, 2010 8:50 am
by tchaithonov
Okay cool. I think that works. I did the calculation, use combined, and then remove the legend. Good enough for now. Thanks Gareth.

Re: Graphing aggregate data from all cross-sections

Posted: Sun Feb 23, 2014 5:47 pm
by Gimel
I am still a novice and trying to do what Eviews did in interactive mode for graphs but I can't.

I read the example in Eviews 7 about classifying population according through year:
In eviews example (gulfcoast.wf1) we have to click population then view/graph change under general to "categorical graph" and change graph data to "sums" and write within graph "year" then click ok.

I am trying to mimic that using command in programming but failed. I did something like:

graph pops.bar pop within(year)

but it didn't work.

Could somebody help me with the command please?

Re: Graphing aggregate data from all cross-sections

Posted: Sun Feb 23, 2014 9:42 pm
by EViews Gareth
Probably need the (contract=sum) option on the bar.

Re: Graphing aggregate data from all cross-sections

Posted: Thu Feb 27, 2014 6:22 am
by Gimel
Thanks a lot it works well now !!!