Bookmark and Share

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


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

st: merging and generating lag variable


From   Prakash Singh <[email protected]>
To   statalist <[email protected]>
Subject   st: merging and generating lag variable
Date   Fri, 6 Jul 2012 23:25:01 +0530

Dear all,
I am working with stata 10 and I have a cross section data of firms
which I want to merge with panel data (state macro economic indicator)
one to one by state and year of survey in state. this part not tricky
for me but in addition to this I want to create lag variable form the
panel data based on year of survey in the cross section data.
I will explain this a bit more for clarity. Suppose there in this
variable SDP for period 2001 to 2008 and in the cross section data the
year of survey of state x is 2003 now, I want two variable SDP and
SDP(t-1) where SDP will have value corresponding to year 2003 for
state x and SDP(t-1) will have value corresponding to year 2002.
Similarly for other state, where the year of state survey varies from
2002 to 2008.

Any suggestion on the issue


Regards
Prakash
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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