Statalist The Stata Listserver

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

st: gen lag variable

From   "irodriguez" <>
Subject   st: gen lag variable
Date   Wed, 02 Aug 2006 17:11:10 -0300

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?

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