Re: st: RE: RE: RE: product function

I don't think it is explicit anywhere in the manual, but
you can assume that -generate- and -replace- follow the
current sort order of the observations.
[...]

Indeed, it is not explicitly stated, and it does work that way; Bill Gould
assured me that it is something you can depend on (I'm referring to a
message from Bill Gould to Statalist on Sept 20, 2001).

While we usually think of Stata as operating on the whole dataset at once,
there is an implicit and usually invisible sequential aspect to it. This
is one place where the sequential aspect is significant.

This feature is very useful in propagating a value "down the list", and
especially with -by-.