import(resize) match-merging does not work as expected with panel data

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

mamo
Posts: 189
Joined: Wed Nov 07, 2012 9:11 am

import(resize) match-merging does not work as expected with panel data

Postby mamo » Fri Aug 03, 2018 3:10 am

Dear Eviews team,

I use Eviews 10+ March 2018 build

Match-merge import with re-sizing does not work as expected with panel data, see example code below.

Best, mamo

Code: Select all

' Create wf with two pages structured as panels
wfcreate(page=p1) a 2000 2001 2
series x1=@crossid
pagecreate(page=p2) a 2000 2001 3
series x2=10*@crossid
'Match-merge page p2 into page p1:
'First, save page p1 into workfile
pagesave(mode=overwrite) temp
'Second, match-merge import the workfile into page p1
pageselect p1
import(resize) temp @id @date(dateid) crossid @destid @date(dateid) crossid x2
'However, the cross-section # 3 (with value x1=NA, and x2=30) from page p2 is missing!
show dateid crossid x1 x2

mamo
Posts: 189
Joined: Wed Nov 07, 2012 9:11 am

Re: import(resize) match-merging does not work as expected with panel data

Postby mamo » Fri Aug 03, 2018 4:03 am

I have also detected the following unexpected behavior of the 'import' command:

an unstructured workfile with more than one identifier variables can be imported by match-merging the same identifier variables in the destination page. However, the same procedure does not work with the destination page and the workfile being structured along the identifier variables (see example code below).

Best, mamo

Code: Select all

' Create page with a double cross-section structure, using c1 {1} and c2 {1,2} as cross-sectional identifier variables
wfcreate(page=p1) u 2
series c1=@floor((@obsid-1)/2)+1
series c2=@obsid-(c1-1)*2
series x1=10*c1+c2
'When the following line is un-commented, the import(resize) command below would not work as expected
'pagestruct c1 c2
' Create another page with a double cross-section structure, using c1 {1,2} and c2 {1,2} as cross-sectional identifier variables
pagecreate(page=p2) u 4
series c1=@floor((@obsid-1)/2)+1
series c2=@obsid-(c1-1)*2
series x2=10*c1+c2
'When the following line is un-commented, the resizing import(resize) command below would not work as expected
'pagestruct c1 c2
pagesave temp
pageselect p1
import(resize) temp @id c1 c2 @destid c1 c2
'This works as expected (giving x1=NA if c1=2) only if the pages have not been structured along the two cross sectional identifier variables c1 and c2
show c1 c2 x?

EViews Steve
EViews Developer
Posts: 788
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: import(resize) match-merging does not work as expected with panel data

Postby EViews Steve » Fri Aug 03, 2018 8:05 am

This is a complicated issue...

Yes, you are correct. Currently the resize option is ignored when you are performing a match-merge import to a panel.

Resizing panel workfiles can be complicated and our current resize dialog only allows you to adjust date ranges, not cross id values.
resize.png
resize.png (9.59 KiB) Viewed 4052 times

The controls related to allow resize for cross id values were left out due to this complexity.

Because of this, we have left it up to the user to do the conversions from panel to unstructured and back again to perform this type of resize, as your second program above has discovered.

Steve


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 10 guests