Hi, my job here is to generate a new variable (dummy for months unemployed) for December. In my analysis, if a person is unemployed for 6 months, which is true in this case, then I will put 1 for him in December. In this example, the person is unemployed for 6 months (from Jan to Jun).
Can anyone tell me how can I do this using stata command?
I do appreciate your help.
hhid month employment status months unemployed dummy for months unemployed
1 January 1 1 0
1 February 1 2 0
1 March 1 3 0
1 April 1 4 0
1 May 1 5 0
1 June 1 6 0
1 July 2 0 0
1 August 2 0 0
1 September 2 0 0
1 October 2 0 0
1 November 2 0 0
1 December 2 0 1
employment status:
1=unemployed
2=employed