How to sum up observation?

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

DB916
Posts: 7
Joined: Wed Sep 01, 2010 3:47 am

How to sum up observation?

Postby DB916 » Thu Sep 02, 2010 9:18 pm

Im using :eviews6:

And i wish to sum up a series

Any ideas?

Thanks
Last edited by DB916 on Fri Sep 03, 2010 5:55 am, edited 2 times in total.

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

How to sum up observation?

Postby EViews Gareth » Thu Sep 02, 2010 10:05 pm

Im using :eviews6:

And i wish to sum up the squares of a series

Any ideas?

Thanks
To sum up squares:

Code: Select all

series sum = @sumsq(x)
To sum up just the series:

Code: Select all

series sum = @sum(x)

DB916
Posts: 7
Joined: Wed Sep 01, 2010 3:47 am

Re: How to sum up observation?

Postby DB916 » Thu Sep 02, 2010 10:11 pm

thank you!
Last edited by DB916 on Fri Sep 03, 2010 5:57 am, edited 1 time in total.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: How to sum up observation?

Postby EViews Glenn » Fri Sep 03, 2010 8:57 am

Did you want the squares or just the levels? @sumsq will give you the sum of squared values. @sum will give you the sum.

zsears
Posts: 9
Joined: Wed Jan 30, 2013 12:22 pm

Re: How to sum up observation?

Postby zsears » Wed Aug 20, 2014 11:40 am

Can @sum be used to sum cross sections, as in to sum up states to get the US total?

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: How to sum up observation?

Postby EViews Glenn » Wed Aug 20, 2014 12:32 pm

You have to give more context. How is your workfile structured?

zsears
Posts: 9
Joined: Wed Jan 30, 2013 12:22 pm

Re: How to sum up observation?

Postby zsears » Wed Aug 20, 2014 1:18 pm

I am working with bilateral travel data,I think I could structure it as a panel, but I did not explicitly do this.

I have it set up as visit_i_j (visits from country i to country j), annual data.

I have generated a pool with the list of countries. So conceptually, I think it should be visit_?_? (will this work?) and when i=j it is zero.

I would like to be able to sum up totals inbound/outbound by year, for example:

total outbound from i = visit_i_?
total inbound to i = visit_?_i.

What would be best way to calculate totals by year? Something like:

smpl 2010 2010 (then loop through years?)
totalout_? = @sum(visit_i_?)

OR another design?

I suspect wit the bilateral aspect, this may be deeper than just the @sum command...

Thanks for guidance.

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

Re: How to sum up observation?

Postby EViews Gareth » Wed Aug 20, 2014 1:51 pm

Maybe a combination of @sum and @rsum, having made the appropriate groups.

ErikG
Posts: 85
Joined: Wed Jan 23, 2013 1:18 am

Re: How to sum up observation?

Postby ErikG » Mon Sep 15, 2014 3:27 am

Try creating a new page and use the link object with match merge:

Code: Select all

Link NewLinSeries NewLinkSeries.linkto(c=sum) oldpage\oldseries @src OldAlphaIdentifier @dest newAlphaIdentifier
You have to create a new alpha series in the new page with the category identifiers you are interested in summing over.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest