Date: Tue, 28 Nov 2006 12:18:37 -0800
Reply-To: monal kohli <k_monal_99@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: monal kohli <k_monal_99@YAHOO.COM>
Subject: Re: Help on data creation for SAS
Content-Type: text/plain; charset=ascii
The reason why you get only one row for id 101 is becuase your by variable is id.If you want a unique combination of ID and time you will have to include both of them in the by statement.
HTH
Mona
----- Original Message ----
From: Kumar <iyer.bharath@GMAIL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Sent: Tuesday, November 28, 2006 3:01:14 PM
Subject: Help on data creation for SAS
Dear Sir,
I have data set that i am preparing for use in NONMEM. I used an
existing macro in SAS to create the data file, but i am able to read
only the first row which is the data at time zero (a sample of the data
set shown below) none of the other observations are recorded onto my
output file... Can you please help me
DATA A;
SET B;
BY ID;
IF FIRST.ID THEN DO;
EVID = 1;
MDV = 1;
DV= 0;
CMT = 1;
AMT = DOSE;
OUTPUT;
AMT= .;
EVID = 0;
DV = CONC;
CMT = 2;
END;
ELSE DO;
AMT = .;
EVID = 0;
DV = CONC;
CMT = 2;
END;
RUN;
Sample Data Set
ID TIME CONC DOSE
101 0 0 5000
101 0.25 0 5000
101 0.5 1.8 5000
101 0.75 16.5 5000
101 1 20.9 5000
101 1.5 32.3 5000
101 2 28.2 5000
101 3 24.7 5000
101 4 24.4 5000
102 0 0 5000
102 0.25 20 5000
Regards
Kumar