I am trying to generate a variable in panel and I am having some issues. I would like to generate a dummy variable with value 1 if an individual has transitioned from any other employment status (jbstat!=1) to being self-employed (jbstat==1).
I have a variable labelled 'pidp' that gives an individual's ID, variable 'jbstat' giving employment status and variable 'year' with values 2013 2015 2017 2019 for each individual (the data is in long format).
I am unsure of how to generate a dummy variable that = 1 if the individual has gone from being not self-employed (jbstat!=1) in year t to being self-employed (jbstat==1) in year t+2, and = 0 if they haven't transitioned to being self-employed.
Thank you in advance.
I have a variable labelled 'pidp' that gives an individual's ID, variable 'jbstat' giving employment status and variable 'year' with values 2013 2015 2017 2019 for each individual (the data is in long format).
I am unsure of how to generate a dummy variable that = 1 if the individual has gone from being not self-employed (jbstat!=1) in year t to being self-employed (jbstat==1) in year t+2, and = 0 if they haven't transitioned to being self-employed.
Thank you in advance.
Comment