LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 20 Jun 2008 16:18:13 -0700
Reply-To:     "Schwarz, Barry A" <>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Schwarz, Barry A" <>
Subject:      Re: Logical Rule
In-Reply-To:  <>
Content-Type: text/plain; charset="us-ascii"

Do you want to check the current rating against the next 12 months (should Jan 2006 be checked against Feb 2006, Mar 2006, ..., Jan 2007) or only against the rating one year later (Jan 2006 checked against Jan 2007 only)?

By the way, from Jan to Jan is 13 months.

-----Original Message----- From: Ricardo G Silva [mailto:snip] Sent: Friday, June 20, 2008 12:28 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Logical Rule

Dear Users,

I have a dataset with the following variables:

ID=identifier; RT=rating do ID (From 1 to 10); DTREF=date (DDMMAAAA).

I need to impose the following rule: in a period of 12 months none ID can change more than 3 ratings down. For example: if ID=1 was RT=4 in jan2006 and RT=2 in jan2007, ok. If ID=2 was RT=10 in jan2006 and RT=5 in jan 2007 then ID'S=2 RT must be 7 (old RT - 3). Since my date is montly, this process must be applied month to month. How can I do this data step? Any hint?



Back to: Top of message | Previous page | Main SAS-L page