Removing duplicates in panel data
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Removing duplicates in panel data
I have a work file with a undated panel (see attached example). Unfortunately it contains quite a few duplicates. How would I remove the superfluous entries?
- Attachments
-
- example.wf1
- (8.98 KiB) Downloaded 308 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Removing duplicates in panel data
How are you defining a duplicate?
Re: Removing duplicates in panel data
Two observations with identical values for all variables.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Removing duplicates in panel data
Can't think of an easy way to do it. This might get you most of the way there:
Make sure you have a backup before trying it though!
Code: Select all
pagecontract if country<>country(-1) or flow<>flow(-1) or value<>value(-1) or year<>year(-1) or @trend=0
Re: Removing duplicates in panel data
If preceded by
your code should settle it, don't you think?
Code: Select all
sort country flow value year-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Removing duplicates in panel data
probably.
Who is online
Users browsing this forum: No registered users and 1 guest
