Re: st: rectangulizing data

I think this might need to be
bysort ID year: egen obs = count(month)
-- perhaps after some work --
but as is agreed the example is unclear.

On 26 May 2011, at 16:52, Oliver Jones <ojones@wiwi.uni-bielefeld.de>
wrote:

Hi,
your example data structure is a bit confusing since you have month
greater than 12... I'll assume you have at most 12 Month per person
per year.
Maybe this can help to drop people how have less than 12 observations
for one particular year. Let's assume this year is 2006.
bysort ID: egen obs = count(Month)
drop if year == 2006 & obs < 12
Dose it work?
Best
Oliver
Am 26.05.2011 17:19, schrieb Dmitriy Krichevskiy:

Dear Listers,
I am trying to figure out the simplest way to covert a large panel
dataset from monthly to annual income. The income is only reported
monthly and I would want to clean the data of anyone missing a month
in a particular year. I would like to drop observations for that
person-year only and keep that person if they are fully present in

some other year. Here is an equivalent data structure. As always,
that