Hi. I am currently working with longitudinal data I have converted to panel data and I now need some help getting to the final sample.
So the respondents must have worked for at least ten years.
What my datasets contains is different cohorts. So HACOHORT describes which cohort the respondents belong to (2,3,4,5).
I need for the different cohorts to keep the respondents who is not retired when entering the survey. That is when Retirement==0. Furthermore a respondent is considered not retired if Retirement==2 together with Weekly_Hours>20
So first question is. In each cohort (HACOHORT[2,3,4,5]) how do I keep both the respondents which have Retirement==0 and the ones with Retirement==2 together with Weekly_Hours>20
Next question is more tricky I think. If a respondent enters not retired from the criterias above and then becomes retired (either by Retirement==2 together with Weeklyhours<20, or Retirement==1), and then enters the labor force (becoming not retired) again I want to exclude these individuals. So changing from not retired, to retired and back to nor retired over the time period which In this example is "Waves" which go from 1-10 where there is two years in between.
In the dataex I have attached the only command I have done is to drop for missing observation on "Retirement". I hop the question make sense, if not please say so and I will try to elaborate.
Thank you very much
Related Posts with Sorting panel data with numerous conditions
Estimation window for multiple events per companyDear community, I want to perform an event study on dividend announcement effects. My problem is th…
Latent Class Model: problem with choosing the number of classesDear Specialists, I have tried the lclogit2 for each class (2,3 and 4), I could receive results fro…
How to create a identifiers in Stata?I have around 40,000 obs in my dataset and I wish to club 1-10 obs as code 1, 11-20 as code 2.. so o…
categorize a variable if certain words are found in it from a big listHi everyone, I want to categorize a variable based on a list that I have maintained. This list is c…
Oprobit dependent variables only categorical?Dear all, I am not that familiar with ordered probit regression. Please, tell me, should all depende…
Subscribe to:
Post Comments (Atom)
0 Response to Sorting panel data with numerous conditions
Post a Comment