sort firm year_id
tsset firm year_id, yearly
gen lsales = l.sales
Rafa
----- Original Message -----
From: "hotmail" <[email protected]>
To: <[email protected]>
Sent: Monday, August 30, 2004 9:03 AM
Subject: st: How to generate lagged variables
> I have an unbalanced panel with 100 firms, 4 years, and about 300 obs.
> Some firms provide information for all empirical years, while others
provide
> for less than 4 periods.
> Using this panel, I need to create lagged variables such as SALES(-1).
> Which command in Stata7-SE should I use to do this?
> Thank you in advance.
> *
> * 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:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/