Date: Tue, 9 Jun 1998 15:04:27 -0700
Reply-To: jjones@vnusinfo.com
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Jason Jones <jjones@VNUSINFO.COM>
Subject: Re: 2 questions about by groups
In-Reply-To: <01IY1999JY7M00039O@uansv5.Vanderbilt.Edu>
Content-Type: text/plain; charset="iso-8859-1"
Robert,
Here are my responses to your questions on BY groups:
1) SAS does not have a built in counter within BY groups in the sense of
_N_.
2) Related to counters in BY groups is the issue of getting LAGged variables
to "respect" BY groups. The way to do this is to simply reset the
appropriate variables when FIRST.variable is true (e.g., IF FIRST.variable
THEN lagvar=. or 0 or " " or whatever)
Jason
Jason Jones
VNUS Information Services
213.508.5347
www.vnusinfo.com
|