Date: Wed, 11 Jan 2006 19:01:22 -0500
Reply-To: Rathindonath <mehedisas@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Rathindonath <mehedisas@YAHOO.COM>
Subject: Data Cleaning ( Please look at this)
Content-Type: text/plain; charset=ISO-8859-1
I am doing some data cleaning. My dataset is as following:
OBS Patient Visit AE Outcome
1 0001 1 Head Not Persisted
2 0001 2 Stomach Persisted
3 0001 3 Stomach Not Persisted
4 0001 4 Head Persisted
5 0002 1 Stomach Persisted
6 0002 2 Head Not persisted
Here if the variable Outcome = ‘Persisted’ then in the next visit for that
patient variable AE must be ‘Head’. The observations do not fulfill this
condition goes to the output
The output Should look like as below
Patient Visit AE Outcome
0001 3 Stomach Not Persisted
0002 1 Stomach Persisted
Can someone be kind enough to help me out with solving this problem ( in a
as few Datastep as possible)? Thanks