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

st: searching in a list.

From   "Ashim Kapoor" <>
Subject   st: searching in a list.
Date   Thu, 18 Sep 2008 10:46:14 +0530

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,
*   For searches and help try:

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