Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: gen lag variable

From   "Radu Ban" <>
Subject   Re: st: gen lag variable
Date   Wed, 2 Aug 2006 16:15:30 -0400

in this case you have to use the -gen- instead of the -egen- command.

2006/8/2, irodriguez <>:
I have a panel data for 1200 firms by year (10 years for each firm)
I need to create a lagged variable of one called  roa but it must be lagged
for each firm
I tried with
by empresa: egen lagroa= roa[_n-1]
but the command give me this error: r(198)
What can I do?

*   For searches and help try:

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