-------------------------------------------------------------------------------
help for spellmerge                                                 (E. Leuven)
-------------------------------------------------------------------------------

Merge adjacent records of time-span data

spellmerge, spell(start end) [by(varlist) gap(days)]

Description

spellmerge merges observations of timespan data that are adjacent.

id date0 date1 1. 1 1jan2000 2jan2000 2. 1 2jan2000 8jan2000 3. 1 12jan2000 20jan2000

becomes

id date0 date1 1. 1 1jan2000 8jan2000 3. 1 12jan2000 20jan2000

Options

by(varlist) specify subset within which merging must take place. Usually an identifyer, but typically should include time-varying characteristics as well.

gap(days) specify maximum gap (in days) between spell for it to be considered adjacent. Default is zero.

Author

E. Leuven, Department of Economics, University of Amsterdam. If you observe any