Date: Wed, 13 Nov 1996 18:46:38 -0500
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
Organization: University at Buffalo
Subject: How to select data groups with n consecutive obs.?
I have a dataset which contains m groups of yearly observations. The
dataset is sorted by GROUP and YEAR but for a givem group the yearly
observations may not be consecutive. Since I am using time series to
analyse the data groups, I need to select observations from
dataset based on two criteria:
(1) Select only groups with n consecutive obs.
(2) For each group selected, take only the n consecutive obs.
Could any one give me a hint on how to do this? The dataset has the
following structure (after sorting by group and year):