Solution

Since the months are still in order, to get information about the first and last month of each spell we just need to work by person spell: and then look at observations [1] and [_N]. Thus:

by person spell: gen startMonth=month[1]
by person spell: gen startYear=year[1]
by person spell: gen endMonth=month[_N]
by person spell: gen endYear=year[_N]

Last Revised: 1/26/2010