[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Teething troubles in using -gen, mod()-
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: firstname.lastname@example.org
Newcastle University |http://www.ncl.ac.uk/geps
* For searches and help try: