Page 1 of 1
Removing duplicates in panel data
Posted: Wed Sep 05, 2012 2:18 am
by paues
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?
Re: Removing duplicates in panel data
Posted: Wed Sep 05, 2012 7:56 am
by EViews Gareth
How are you defining a duplicate?
Re: Removing duplicates in panel data
Posted: Wed Sep 05, 2012 8:02 am
by paues
Two observations with identical values for all variables.
Re: Removing duplicates in panel data
Posted: Wed Sep 05, 2012 8:07 am
by EViews Gareth
Can't think of an easy way to do it. This might get you most of the way there:
Code: Select all
pagecontract if country<>country(-1) or flow<>flow(-1) or value<>value(-1) or year<>year(-1) or @trend=0
Make sure you have a backup before trying it though!
Re: Removing duplicates in panel data
Posted: Wed Sep 05, 2012 8:16 am
by paues
If preceded by
your code should settle it, don't you think?
Re: Removing duplicates in panel data
Posted: Wed Sep 05, 2012 8:22 am
by EViews Gareth
probably.