Page 1 of 1

How to sum up observation?

Posted: Thu Sep 02, 2010 9:18 pm
by DB916
Im using :eviews6:

And i wish to sum up a series

Any ideas?

Thanks

How to sum up observation?

Posted: Thu Sep 02, 2010 10:05 pm
by EViews Gareth
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)

Re: How to sum up observation?

Posted: Thu Sep 02, 2010 10:11 pm
by DB916
thank you!

Re: How to sum up observation?

Posted: Fri Sep 03, 2010 8:57 am
by EViews Glenn
Did you want the squares or just the levels? @sumsq will give you the sum of squared values. @sum will give you the sum.

Re: How to sum up observation?

Posted: Wed Aug 20, 2014 11:40 am
by zsears
Can @sum be used to sum cross sections, as in to sum up states to get the US total?

Re: How to sum up observation?

Posted: Wed Aug 20, 2014 12:32 pm
by EViews Glenn
You have to give more context. How is your workfile structured?

Re: How to sum up observation?

Posted: Wed Aug 20, 2014 1:18 pm
by zsears
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.

Re: How to sum up observation?

Posted: Wed Aug 20, 2014 1:51 pm
by EViews Gareth
Maybe a combination of @sum and @rsum, having made the appropriate groups.

Re: How to sum up observation?

Posted: Mon Sep 15, 2014 3:27 am
by ErikG
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.