[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: Unexpected -egen , fill()- behavior
Another solution is -egen group = seq(), block(4)-.
Nick
[email protected]
Jeph Herrin
> Or perhaps even better,
>
> . sort x
> . gen group = ceil(_n/4)
Jeph Herrin
> > . egen group=fill(1 1 1 1 2 2 2 2 )
> >
> > will do what you need.
*
* 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/