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

RE: RE: st: creating lag variables (corrected)


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: RE: st: creating lag variables (corrected)
Date   Mon, 5 May 2003 14:59:37 +0100

REKA SUNDARAM-STUKEL

> 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.

No; this is very well documented.

Various possible sources of explanation.

1. On-line help for -by-.

2. [U] 14.5 (pp.108-9 in Stata 8 version; p.84 in Stata 7 version).

3. There is a discussion of by: in Stata Journal 2(1), 86-102 (2002),
which may be accessible to you.

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/



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