Hi all,

I am so stuck with my data preperation before even beginning with the actual analysis and really hope someone can help me.

I have a very large panel data set (already with some event data variables included) about people labour status and would like to drop some ID´s which are not relevant for my analysis.
I am only interested in women (it was easy to drop all men) which had at least one period of maternity leave (ArbeitKinder=Kinder) and at least one period of full- or part-time work (already created the "work-variable"-> ArbeitKinder=Arbeit).

The data looks somewhat like this:
Array

In this little example of my data basis I am only interested to keep the ID "2674000", because it is the only woman with maternity leave and work periods (duration and activity beginning and end are in the example included).

I have two questions:
1) How can I drop all ID´s which are not interesting to me and keep ALL periods of the interesting ID´s?

2) In a second step (after droping the ID´s) I want to only keep those women who worked AFTER the maternity leave (and I want to treat it as "not working again" after 36 months?)

I am so greatful in advance for your help!

Best regards,
Susa