Page 1 of 1

Copying one cross section

Posted: Wed Apr 06, 2016 10:00 am
by startz
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?

Re: Copying one cross section

Posted: Wed Apr 06, 2016 10:30 am
by EViews Gareth
Probably easier ways to do it, but this works:

Code: Select all

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

Re: Copying one cross section

Posted: Wed Apr 06, 2016 10:38 am
by startz
diolch