Hello everyone,
I am trying to do the following : -
I have a variable r. I want to create a variable m=min( r, r[_n-1],
... ,r[_n-9])
I guess I can use a while loop to do this but that is quite slow. An
alternative would be to define r0=r,r1=r[_n-1],..,r9=r[_n-9]
and then say m=rmin ( r0 r1 ... r9).
My question is that is there a built in way in stata to do this ? like
say by using egen ?
Thank you all for your time and effort.
Ashim. : )
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/