Data by identifier

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

flcardoso
Posts: 9
Joined: Tue Nov 19, 2013 4:10 pm

Data by identifier

Postby flcardoso » Tue Nov 19, 2013 4:14 pm

Hello,

I am working with panel data but I need to select data for specific individuals, e.g. series(USA), such that I have a series I can substract from all other values of another series for all other observations, for example GDP-GPD(USA). How can I do this?

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

Re: Data by identifier

Postby EViews Gareth » Tue Nov 19, 2013 4:22 pm

Do you have a panel workfile? If so, something like:

Code: Select all

series gdpdiff = gdp - @maxsby(@recode(country="USA", gdp, 0), @obsid)
where "country" is your cross-section identifier series.

flcardoso
Posts: 9
Joined: Tue Nov 19, 2013 4:10 pm

Re: Data by identifier

Postby flcardoso » Tue Nov 19, 2013 4:33 pm

Great, that seems to have worked. Thanks a lot!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest