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

st: help with understanding syntax 'gen last=_n==_N'

From   "b. water" <>
Subject   st: help with understanding syntax 'gen last=_n==_N'
Date   Sun, 27 Nov 2005 14:38:55 +0000

dear listers,

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,

Express yourself instantly with MSN Messenger! Download today - it's FREE!

*   For searches and help try:

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