[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Locating Point Fitting Criteria in Panel Data
Dear Stata Users,
May I ask somebody how to code the following?
I have panel data of the form:
seller product year value
13 456 1988 0
13 456 1989 0
13 456 1990 9
13 456 1991 0
13 456 1992 2
13 456 1993 6
13 456 1994 7
In the real data I have millions of obs for many sellers, products and
different years available for each seller-product.
I would like to find for each seller-product, the first year of the first
three year period where value is positive for all three of those years. In
the above example, for seller 13, product 456, the year would be 1992.
I can't seem to write the correct if statement to do what I want.
Thanks very much for your help.
* For searches and help try: