Hello everyone,
I have a query. I want to lag a variable but by _n-1.
I want to say : sort state year
now I want something like : by year state : replace incumbent =
winner[_n-1] but here the winner[_n-1] should be the winner in the
same state but prev year , ie. it should be from the PREVIOUS BLOCK
of state year.
Any ideas anyone ?
Thank you,
Ashim.
*
* 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/