Jean Ries replied:
> I think you should sort your data by id after expanding. In fact, the
> observations created by -expand- are added to the end of the data set.
> Try this:
>
> . expand 5
> . sort id
> . gen alt = mod(_n,5)
That sorted it (if you'll excuse the pun). Ta very much!
CLIVE NICHOLAS |t: 0(044)7903 397793
Politics |e: [email protected]
Newcastle University |http://www.ncl.ac.uk/geps
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/