Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Locating Point Fitting Criteria in Panel Data


From   Jason Hwang <[email protected]>
To   [email protected]
Subject   st: Locating Point Fitting Criteria in Panel Data
Date   Mon, 28 Feb 2005 20:05:54 -0500 (EST)

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.

Jason
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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