Copying one cross section

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

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Copying one cross section

Postby startz » Wed Apr 06, 2016 10:00 am

I'm sure this is obvious, but I've forgotten how to do it. I have a panel organized as countries by years. I want to create a new variable that is country i GDP in year t minus US GDP in year t. How do I that?

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

Re: Copying one cross section

Postby EViews Gareth » Wed Apr 06, 2016 10:30 am

Probably easier ways to do it, but this works:

Code: Select all

series gdpidx = gdp - @meansby(gdp, @date, "if country=""USA""")

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Copying one cross section

Postby startz » Wed Apr 06, 2016 10:38 am

diolch


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests