Hi Guys,
I have some problems with fetch(link) and matching cross-section + dates given that my workfile is created upon a sample period of the database. I am struggling a bit here mostly because I am getting data from multiple databases, and they all have different start and end dates (while most periods are intercepting each other). I wonder if there is anything beyond fetch(link) db1::x* (e.g.) that I could use to govern how data is being linked to the workfile, so that it would match the cross and date ids -- something along the line of match merge with import. Any ideas are welcome. Thanks.
Tchaithonov
Database, Fetch(link), Dates, Panel Dataset
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
tchaithonov
- Posts: 168
- Joined: Mon Apr 13, 2009 7:39 am
- Location: New York City
-
tchaithonov
- Posts: 168
- Joined: Mon Apr 13, 2009 7:39 am
- Location: New York City
Re: Database, Fetch(link), Dates, Panel Dataset
Not sure if any of you is interested in a solution, but I seem to find an indirect approach (Database --> new page --> the final page):
1. Create a new page and fetch the data from the database (call this one "DB").
2. Create a group ("group1") that contains all the variables that need to be linked to the main modeling page (let's call this one "Main").
Obviously, the smpl on the 2nd line of LINK could be adjusted towards what the destination sample is and the source and destination's crossid and dateid should be replaced by the ID names that you have in your workfile. I did a quick check on my data and it seems to work.
1. Create a new page and fetch the data from the database (call this one "DB").
2. Create a group ("group1") that contains all the variables that need to be linked to the main modeling page (let's call this one "Main").
Code: Select all
pageselect DB
group group1 var*
for !i = 1 to group1.@count
%var = group1.@seriesname(!i)
pageselect Main
link {%var}
link {%var}.linkto(smpl="1/2/2006 3/14/2010", nacat) DB\{%var} @src crossid dateid @dest crossid dateid
pageselect DB
next
pageselect Main
Who is online
Users browsing this forum: No registered users and 2 guests
