gravity model of trade - pagestruct, pagestack, etc.

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

michi
Posts: 11
Joined: Thu Apr 18, 2013 7:48 am

gravity model of trade - pagestruct, pagestack, etc.

Postby michi » Thu May 02, 2013 12:16 pm

Hellohello,

I'm using eviews7 and I have a small (maybe kind of studip/easy) problem. :-)
I'm doing a gravity model for international trade flows and I need to import 3 different excel-sheets (trade-flows, gdp, cepii) and merge them in a dated panel structured wf. I have a lot of questions concerning this project and I would be really really happy, if somebody would offer me some hellp. :-)

-Allright, let's start with the GDP-wf. It is unstructured and undated and the original condition looks like the sketch at the top of the attached file. This is a panel wide format, isn't it? So I have to do a pagestack command, but I don't know how to do it to get the form I sketched at the bottom of the attached file. It's similar to one of the examples in "how to enter data into a panel workfile", but I didn't get it anyway... What's the first step I have to take? first pagestack and then pagestruct or the other way round?

-I'm a little bit confused by numbers like 3.11E+11, everything allright with these numbers?

-I read I have to delete the "missings" (=NA's?). How am I doing this?

I would be so glad to have your explanations!

Thank you :-)
Attachments
Foto(1).JPG
Foto(1).JPG (1.91 MiB) Viewed 8609 times

michi
Posts: 11
Joined: Thu Apr 18, 2013 7:48 am

Re: gravity model of trade - pagestruct, pagestack, etc.

Postby michi » Fri May 03, 2013 10:56 am

This is what the wf looks like:

wfile1.JPG
wfile1.JPG (1.97 MiB) Viewed 8595 times


Why doesn't it work out to do "pagestruct country_name country_code"? I want to have them both as my cross-id-series, but eviews says "Illegal panel structure COUNTY_NAME is nested within the previous dimensions of the panel structure".
Then I would do:
pagestack(page=panel_long, interleave) num? @ num?
rename var01 year
pagestruct country_name country_code @date(year)

Does that sound good? But where is the mistake?

If I do pagestruct country_name (pagestruct country_code) and afterwards the steps above country_code (country_name), indicator_code and indicator_name disappears...

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: gravity model of trade - pagestruct, pagestack, etc.

Postby EViews Glenn » Fri May 03, 2013 11:38 am

To be honest, it's going to be hard for anyone to answer any of these questions without having access to the workfile. Could you post it here?

michi
Posts: 11
Joined: Thu Apr 18, 2013 7:48 am

Re: gravity model of trade - pagestruct, pagestack, etc.

Postby michi » Fri May 03, 2013 12:04 pm

I posted it in the second post. Any problems with the picture? maybe it's too huge?

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: gravity model of trade - pagestruct, pagestack, etc.

Postby EViews Glenn » Fri May 03, 2013 12:47 pm

I meant the actual workfile, not a photo.

michi
Posts: 11
Joined: Thu Apr 18, 2013 7:48 am

Re: gravity model of trade - pagestruct, pagestack, etc.

Postby michi » Fri May 03, 2013 1:19 pm

Ah I see, sorry, everything new to me :-(

gdp.wf1
(80.94 KiB) Downloaded 489 times

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: gravity model of trade - pagestruct, pagestack, etc.

Postby EViews Glenn » Fri May 03, 2013 3:34 pm

Country code and country name are the same variable. You can't have both of them as identifiers since either one is sufficient to identify the panel.

michi
Posts: 11
Joined: Thu Apr 18, 2013 7:48 am

Re: gravity model of trade - pagestruct, pagestack, etc.

Postby michi » Sat May 04, 2013 7:40 am

ok, I think I got it... This is what the wf looks like now:

gdp_gen.wf1
(448.04 KiB) Downloaded 505 times


is it ok so far?

michi
Posts: 11
Joined: Thu Apr 18, 2013 7:48 am

Re: gravity model of trade - pagestruct, pagestack, etc.

Postby michi » Wed May 08, 2013 11:58 am

Hey guys,

I've worked on the individual wfs gdp, bilateral trade and the data from CEPII(distance). Now I am trying to merge these three pages. I can't upload the wf, it's too huge or something, tried it several times, but I give you my commented program, hope that works as well.

What I can't understand is the fact that Eviews copies me the gdp for the ctr_d perfectly, but doesn't for the ctr_o, though it's the same command .... What have I disregarded?

I hope you can help!!! I don't find the issue...

thanks a lot!!!

Kopie von a01.txt
(1.46 KiB) Downloaded 393 times

michi
Posts: 11
Joined: Thu Apr 18, 2013 7:48 am

Re: gravity model of trade - pagestruct, pagestack, etc.

Postby michi » Fri May 10, 2013 10:30 am

Hi,

could please anybody help me? I'm going nuts, trying to fix that problem for 3 days, starting over and over again with no result... :-((

wf attached

Here's what I tried to do:

copy gdp\gdp total\gdp_o @src ctr_id year @dest ctr_o year
copy gdp\gdp total\gdp_d @src ctr_id year @dest ctr_d year

Eviews copies the gdp, but applies for gdp_o always the same value, for example ALB 1,3, which is wrong. Fot gdp_d everything works.

Please help me, otherwise I have to smash my computer. :-)
Attachments
total.zip
(992.66 KiB) Downloaded 440 times


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 30 guests