Hey guys,
I have a panel set up.
I have industries identified by an industry code as the cross-section, and years as the time series identifiers.
IE:
INDCODE YEAR GDP EMP
1 95 25 100
1 96 28 134
1 97 39 148
1 98 56 150
2 95 15 32
2 96 19 22
2 97 25 21
2 98 32 24
etc.
So my question is, how do I combine industries? Like say Indcode 1 is plum farming and Indcode 2 is grain farming, how do I combine the series to get a total GDP for the plum and grain farming sector?
Cheers,
Nik
Summing Series in Panel Data
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Summing Series in Panel Data
Looks like you don't currently have a panel workfile, rather you have a pool workfile.
In the pool workfile, you can put the two series into a group, and then type "show @rsum(g)" where g is the name of the group.
Or, you could convert your pool into a panel:
http://forums.eviews.com/viewtopic.php?f=7&t=74
In the pool workfile, you can put the two series into a group, and then type "show @rsum(g)" where g is the name of the group.
Or, you could convert your pool into a panel:
http://forums.eviews.com/viewtopic.php?f=7&t=74
Re: Summing Series in Panel Data
Hi Gareth,
Thanks for helping me on this!
I thought I had a panel? I opened the data as a dated panel with a time series identifier and a cross-section identifier.
Here's what it looks like:

NVAL is nominal value added, HRS is hours worked that year. I want to sum NVAL for industries 1 and 2 (indcode 1 and indcode 2). How do I use the @rsum function to do this? I know I should probably just read the chapters in the pdf that came with eviews, and I plan to do this soon, but I need to get these figures sorted out quickly.
Cheers, and thanks for any help you can give,
Nik
Thanks for helping me on this!
I thought I had a panel? I opened the data as a dated panel with a time series identifier and a cross-section identifier.
Here's what it looks like:

NVAL is nominal value added, HRS is hours worked that year. I want to sum NVAL for industries 1 and 2 (indcode 1 and indcode 2). How do I use the @rsum function to do this? I know I should probably just read the chapters in the pdf that came with eviews, and I plan to do this soon, but I need to get these figures sorted out quickly.
Cheers, and thanks for any help you can give,
Nik
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Summing Series in Panel Data
Sorry, I misunderstood your original post. Yes, you have a panel.
Do this:
Do this:
Code: Select all
show @sumsby(nval, @obsid)
Re: Summing Series in Panel Data
Hi Gareth,
That seems to give the sum of NVAL for each year for all the industries (I have some 95 of them). If I just want to add industry 1 and 2, how would I do that? (I need to aggregate a number of different industries into larger sector categories).
Cheers,
Nik
That seems to give the sum of NVAL for each year for all the industries (I have some 95 of them). If I just want to add industry 1 and 2, how would I do that? (I need to aggregate a number of different industries into larger sector categories).
Cheers,
Nik
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Summing Series in Panel Data
Code: Select all
smpl if @crossid=1 or @crossid=2
show @sumsby(nval, @obsid)
Re: Summing Series in Panel Data
okay that seems to work
thanks!
thanks!
Who is online
Users browsing this forum: No registered users and 2 guests
