My data is in spell format, see example below. Spells can be both employment and unemployment spells and can be overlapping, but this shouldn't be too much of a problem for this question.
I want to find the number of months employed in a year, where the month employed variable ought to be one if the person was at least one day in employment during the month. Any suggestions on how to approach this?
Code:
input spellid persid beg end employment jobid 1 1 19961210 19961231 0 0 2 1 19960106 19960812 1 1 3 1 19960812 19961001 0 0 end
Comment