Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: help to understand syntax 'qui by study: gen last=_n==_N'


From   "b. water" <[email protected]>
To   [email protected]
Subject   RE: st: help to understand syntax 'qui by study: gen last=_n==_N'
Date   Sun, 27 Nov 2005 16:42:14 +0000

dear listers,

again, my apology if at some point in the near future, another two virutally identical postings appeared on the list. i tried to send this question earlier (x2) but seemed not to have appeared so i resorted to using reply instead and it seems to have worked for my other question, so here it is:

i am trying to understand one of the do-files application for stata. one of the lines read:

qui by study: gen last=_n==_N

my understanding so far: this is quietly, sort according to study, and as a result, to generate a variable 'last' fulfilling this condition _n==-N. although i have the output, i would like to know what in general does gen last=_n==_N do?

thank you,
bw

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar � get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

*
* 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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index