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
Graphing aggregate data from all cross-sections
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
tchaithonov
- Posts: 168
- Joined: Mon Apr 13, 2009 7:39 am
- Location: New York City
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Graphing aggregate data from all cross-sections
Aren't you just saying you want to stack (panel=stack) the cross-sections?
-
tchaithonov
- Posts: 168
- Joined: Mon Apr 13, 2009 7:39 am
- Location: New York City
Re: Graphing aggregate data from all cross-sections
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?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Graphing aggregate data from all cross-sections
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:
where Y is the series you're interested in graphing.
Code: Select all
series ysum = @sumsby(y,@cellid)
-
tchaithonov
- Posts: 168
- Joined: Mon Apr 13, 2009 7:39 am
- Location: New York City
Re: Graphing aggregate data from all cross-sections
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
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?
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?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Graphing aggregate data from all cross-sections
Probably need the (contract=sum) option on the bar.
Re: Graphing aggregate data from all cross-sections
Thanks a lot it works well now !!!
Who is online
Users browsing this forum: No registered users and 1 guest
