Construction new variable

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

Ydwolf
Posts: 14
Joined: Thu Oct 06, 2011 11:42 pm

Construction new variable

Postby Ydwolf » Tue Nov 22, 2011 1:46 am

Hi,

I am working with panel data where I have observations for each country(68 countries in total) in each year(2004 and 2005). Spain and the UK are my ground zero countries (where a terrorist attack has taken place). So for each variable, I have got 136 observations.
trade_spain trade_UK
2004 country1 : ... ...
2004country2:
...

2005country1:
2005country2:
...

My question now is: Is it possible to construct a new variable "trade_groundzerocountry", as the combination of trade_spain and trade_UK? So with 136*2=272 observations?
Because I am interested in the descriptive stats of the two variables together...

Thank you!

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

Re: Construction new variable

Postby EViews Gareth » Tue Nov 22, 2011 8:43 am

Could you post your workfile? I'm having trouble envisioning how you have the data currently set up.
Follow us on Twitter @IHSEViews

Ydwolf
Posts: 14
Joined: Thu Oct 06, 2011 11:42 pm

Re: Construction new variable

Postby Ydwolf » Tue Nov 22, 2011 10:17 am

Of course, I should have uploaded it immediately.
So, I am interested in turning tradespain and tradeUK into one variable "tradegzc", and similarly, finaspain and finaUK into one variable "finagzc", so I could get the descriptives stats out of it.

P.S.: The file is in Dutch, land1 means country1, and so on.

Thanks a lot!!
Yasmin
Attachments
proxies_2004_2005.wf1
(103.22 KiB) Downloaded 78 times

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

Re: Construction new variable

Postby EViews Gareth » Tue Nov 22, 2011 11:09 am

Delete (or rename) the "trade" and "fina" variables you currently have. Then use Proc->Reshape Current Page->Stack in New Page, then enter "trade?" in the first box, and hit ok.
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 3 guests