I am quite new to Stata and did some thorough research on how to do the following, but didn't seem to get it done properly.
Currently I am trying to clean my dataset which looks something like this:
I want to keep only the ID's that include all of the years 2008-2011 and drop all observations that only have a subset of those. (my dataset is far bigger than this, hence dropping manually doesn't work)
However, everything I tried has not worked out so far so I was hoping one of you could help me out a bit here.
Cheers,
Moos
Currently I am trying to clean my dataset which looks something like this:
ID | Year | Cash |
1 | 2008 | 20 |
1 | 2009 | 23 |
1 | 2010 | 21 |
1 | 2011 | 18 |
2 | 2009 | 52 |
2 | 2010 | 51 |
2 | 2011 | 50 |
3 | 2009 | 12 |
3 | 2010 | 14 |
However, everything I tried has not worked out so far so I was hoping one of you could help me out a bit here.
Cheers,
Moos
Comment