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: Counting number of observations in the following 4 years
From
micdepo mic <[email protected]>
To
statalist <[email protected]>
Subject
st: Counting number of observations in the following 4 years
Date
Thu, 20 Feb 2014 00:24:46 +0000
Hi,
I have data on variable X for a period of time. I am trying to count
for every given year t the number of future observations on X in the
following 4 years. I will keep this year's observation X_t iff I know
for sure X_t+k is not missing for k=1,2,3,4 (i.e. I have data on X for
every year in the next four years). This will go on for every year t
from t=1 to T. I would be most grateful if you could please tell me
the easiest way to do this kind of operation. Thanks very much in
advance.
Best regards,
Mic
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/