[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: RE: st: creating lag variables (corrected)
I typed the following:
bysort id type: gen lag_choice=choice[_n-1]
Could you please explain why 'year' needs to be in
parenthesis. Thank you.
----- Original Message -----
From: Nick Cox <email@example.com>
Date: Monday, May 5, 2003 8:11 am
Subject: RE: st: creating lag variables (corrected)
> REKA SUNDARAM-STUKEL
> > Thanks to both Nick and Oleksandr. In reply to Nick's
> > question I am not sure why it doesn't work.
> What did you type? Can you remember or
> retrieve it from a log file?
> One possibility is that
> . bysort id type (year) : ...
> is guaranteed to get -year- in the
> desired order, whereas
> . bysort id type : ...
> is not so guaranteed.
> * 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/
* For searches and help try: