generating a date id and crosssectid series for dynm panels

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

helplessbunny
Posts: 8
Joined: Tue Jun 18, 2013 10:58 am

generating a date id and crosssectid series for dynm panels

Postby helplessbunny » Tue Jun 18, 2013 12:36 pm

Dear EViews Community!
Long time admirer; first time poster!

I have massive trouble generating a dateid series and a cross-sectionalid series for my dynamic panel analysis.
My excel file looks as follows (also available as .txt): - see attachment



.) dateid series:
the dates start in the 2nd quarter of 1982 (1.4.1982) with a value of 18 and end in the 4th quarter of 1998 (1.10.1998) with a value of 84. – how can I generate a dateid series with this data? All the examples and explanations I found deal with dates that are already in date form.

.) crossid series: (the yellow column does not exist in the file - i added it for demonstration purposes)
The cross-sections can be identified by the fact that every 40 (!) rows display one individual in the cross section, ergo rows 2-41 are individual 1, rows 42-81 are individual 2, ...

In principle the data are quite fitting for dynamic panels if only it would include a column with the dates in actual date form and a column with codes for the individuals.

PLEASE help!

Regards
Your humble reader
Attachments
Unbenannt.jpg
tiny fraction of data in excel file
Unbenannt.jpg (494.3 KiB) Viewed 5113 times

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

Re: generating a date id and crosssectid series for dynm pan

Postby EViews Gareth » Tue Jun 18, 2013 1:44 pm

It isn't particularly clear how your quarters work (if you have quarterly from 1982q2 to 1998q4, you have 67 observations, yet you say you have 40 rows per cross-section?).

I think I'd just create a new, empty, panel with the dates you want, and the number of cross-sections you want, then just do a simple, non-dated, sequential import.

helplessbunny
Posts: 8
Joined: Tue Jun 18, 2013 10:58 am

Re: generating a date id and crosssectid series for dynm pan

Postby helplessbunny » Tue Jun 18, 2013 11:13 pm

thank you so much for your early reply!

I forgot to mention - not all cross-section participants exist in all periods - f.e. individual 1 exists in periods 18-57 (row 1-40) and individual 2177 exists in periods 24-63 (rows 87041-87080) - (btw I just figured out how to do my cross-section (even if I may not need it) - its quite easy using a mod calculation for the row numbers) - and I have far more than 67 obs. - in fact I have thousands up on thousands of obs.

I will try the approach you suggested and be back with how it worked! Thank you so much!

helplessbunny
Posts: 8
Joined: Tue Jun 18, 2013 10:58 am

Re: generating a date id and crosssectid series for dynm pan

Postby helplessbunny » Wed Jun 19, 2013 4:50 am

Hello again!

I tried your approach: open empty panel wf - periods 1982:2 - 1998:4 and ~14000 cross sections - but the problem is, that now for all 14000 cross sections EViews displays the periods from 1982:2 to 1998:4 - which is not really what I need since my cross sections do not exist in all periods but only in 40 (that are different between cross section participants).

Is there a way to generate a dateid series by decoding the number 18-84 into date? So that 18=4/1/1982 and for every +1 in the number EViews counts one quarter into the future? That would be an ideal dateid to generate my panel.

Regards
Your humble reader

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

Re: generating a date id and crosssectid series for dynm pan

Postby EViews Gareth » Wed Jun 19, 2013 7:57 am

Code: Select all

series mydate = @trend+18


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests