Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Problem creating lag variable in panel data

From   Michael Riechert <>
To   "" <>
Subject   st: Problem creating lag variable in panel data
Date   Tue, 17 Dec 2013 19:02:52 +0000

Dear all,

I still facing problem while creating a lag variable within my panel data. I have
multiple cross sectional units (companies) and years. I used xtset to define
panel structure and then  gen roi1=1.roi to create a 1-year lag variable
of the original variable roi. But the new variable only contains zeros. The
same is true for other variables. I am sure I did something wrong but have no
clue so far what it is. I appreciate every hint you will give me. Thank you!

Best regards,

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index