Hey!
I need to calculate the years of unemployment from the time period 2001 - 2012. This variable "years of unemployment" should show the sum of the total duration of unemployment in years of every person from 2001 - 2012.
For example a person was registered as unemployed in 2001, also in 2002, but then in 2003 the person was not registered as unemployed anymore.
I have following variables:
- pid: describes the personal identification number
- syear: describes the survey years, I need the years from 2001-2012
- unemployed: describes if a person (pid) is registered as unemployed or not (1= yes, 2= no)
Could anyone please help me to find the right command in stata to get the years of unemployment?
I just know that I first have to sort but then I have no clue at all.
Thank you very much.
Regards
Tina
I need to calculate the years of unemployment from the time period 2001 - 2012. This variable "years of unemployment" should show the sum of the total duration of unemployment in years of every person from 2001 - 2012.
For example a person was registered as unemployed in 2001, also in 2002, but then in 2003 the person was not registered as unemployed anymore.
I have following variables:
- pid: describes the personal identification number
- syear: describes the survey years, I need the years from 2001-2012
- unemployed: describes if a person (pid) is registered as unemployed or not (1= yes, 2= no)
Could anyone please help me to find the right command in stata to get the years of unemployment?
I just know that I first have to sort but then I have no clue at all.
Thank you very much.
Regards
Tina
Comment