On Tue, 3 Feb 2004, Nick Cox wrote:
> Allan is incorrect ...
Agreed, and I had completely misread Ben's problem. Also, the code I
offered had a missing index
> > loc nn = _N
> > gen y = .
> > forvalues i = 1/`nn' {
> > replace y = x in rankx[`i']
> > }
The difference between this and "gen y = x[z]" is that rankx does not
point to the element in x to be copied, but to the position in y where it
is to go.
* gen y[rankx] = x
is the code that is disallowed - but by the time you read this it may be
in the latest upgrade.
*
* 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/