Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Deleting entire panel id/group if condition is true for first year


From   Andreas Dall Frøseth <Andreas.Froseth@stud.nhh.no>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Deleting entire panel id/group if condition is true for first year
Date   Wed, 1 May 2013 13:14:43 +0000

Dear listers.

Is it possible to delete a entire panel id/group from the set if a certain condition is true for the first year?
I'm trying to keep certain spells in my dataset, and by using the -tsspell- (SSC) I have managed to keep panel variables with runs equal or above 7 years. But, I also wish to keep panel groups with 6 year runs IF the value in the variable "category" is nonmissing for the first year (or actually every year).

Any thoughts?

-Andreas
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index