skipping a large number of observations

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

phr
Posts: 3
Joined: Tue May 19, 2009 12:13 pm

skipping a large number of observations

Postby phr » Tue May 19, 2009 12:27 pm

I have a very large panel dataset. Due to some double-reporting, I need to skip or delete a large number of observations, where the only unique identifier is an alpha series. I tried assigning a value map and then using the smpl command, but this didn't work. Any suggestions on which approach to try next?

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

Re: skipping a large number of observations

Postby EViews Gareth » Tue May 19, 2009 1:15 pm

If you want to delete them, you can use the Page Contract tool to remove them from the workfile.

If you just want to remove them from the sample, you can use if statements in your sample condition to remove them.

phr
Posts: 3
Joined: Tue May 19, 2009 12:13 pm

Re: skipping a large number of observations

Postby phr » Tue May 19, 2009 2:22 pm

If you want to delete them, you can use the Page Contract tool to remove them from the workfile.

If you just want to remove them from the sample, you can use if statements in your sample condition to remove them.
Using page contract reverses the dimension of my panel workfile i.e. the dimension was (330,73) before pagecontract and (73,330) after. How can I fix this?

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

Re: skipping a large number of observations

Postby EViews Gareth » Tue May 19, 2009 2:56 pm

Not quite sure how you managed that. Could you post the workfile prior to the page contract, and then tell us exactly what you did?

phr
Posts: 3
Joined: Tue May 19, 2009 12:13 pm

Re: skipping a large number of observations

Postby phr » Wed May 20, 2009 10:29 am

I don't think I can post the workfile, as it contains confidential tax information. It is a four-dimension panel workfile with 128399 obs. Here were the steps I used:
1) Took an alpha series which contained multiple entries with different names but the same information, and created a value map.
2) Used the valmap series, along with the sample command, to exclude duplicate entries. smpl if x><1 and x><2 etc.
3) Created a dummy and set the sample, just to clean up the workfile info so that I could see the number of obs remaining.
4) Contracted the page.

Code: Select all

taxq.makemap(nosort) taxq_ser taxq_map Smpl if taxq_ser><1 and taxq_ser><2 and taxq_ser><3 and taxq_ser><4 and taxq_ser><6 and taxq_ser><10 and taxq_ser><12 and taxq_ser><53 and taxq_ser><54 and taxq_ser><56 and taxq_ser><57 and taxq_ser><59 and taxq_ser><60 and taxq_ser><93 and taxq_ser><94 and taxq_ser><96 and taxq_ser><97 and taxq_ser><99 and taxq_ser><100 and taxq_ser><101 and taxq_ser><102 and taxq_ser><103 and taxq_ser><105 and taxq_ser><106 and taxq_ser><108 and taxq_ser><109 and taxq_ser><111 and taxq_ser><112 and taxq_ser><114 and taxq_ser><115 and taxq_ser><117 and taxq_ser><119 and taxq_ser><120 and taxq_ser><144 and taxq_ser><155 and taxq_ser><156 and taxq_ser><181 and taxq_ser><183 and taxq_ser><186 and taxq_ser><187 and taxq_ser><191 and taxq_ser><202 and taxq_ser><203 and taxq_ser><205 and taxq_ser><206 and taxq_ser><211 and taxq_ser><242 series non_dupl=1 pagecontract if non_dupl=1
I know this isn't the ideal way to troubleshoot this, and I appreciate any help.

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

Re: skipping a large number of observations

Postby EViews Gareth » Wed May 20, 2009 10:35 am

Could you create an identically structured workfile, but fill it with random numbers, then post that? It seems that the problem is not with the data itself, just with the structure of the data.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests