Nick--
To be sure, and -bys- is a marvelous thing, but I was more thinking of
egen minyr=min(year), by(bdsmaster)
gen fyr=(year==minyr)
tab minyr if fyr, mi
codebook minyr
hist minyr if fyr
etc.
On 5/17/07, Nick Cox <[email protected]> wrote:
Quite so.
As you know, but some may not,
the first year can always be used, without
putting it into a variable, in ways like this
bysort bdsmaster (year) : gen years_since_first = year - year[1]
Nick
[email protected]
*
* 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/