[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: cleaning panel data
--On Thursday, September 26, 2002 2:33 -0400 Nick wrote:
This is a more comprehensive solution than that I proposed. I do think
there is still one kind of error that it will not catch, though: literally
duplicate obs. with same firmid|year|region, since they will not violate
either of the above conditions. It is quite possible that this kind of
error can appear in these data. Judicious addition of 'dups' to the above
will catch those as well.
. bysort firm (year) : gen prob1 = year != year[_N]
. bysort id (region) : gen prob2 = region != region [_N]
. list firm id year region if prob1 | prob2
Logic: for example, sort by -firm- and within each -firm- by -year-.
If the last
value of -year- for each -firm- differs from the first, you have
* For searches and help try: