| Date: | Wed, 30 Apr 2008 19:24:23 -0400 |
| Reply-To: | Ya Huang <ya.huang@AMYLIN.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Ya Huang <ya.huang@AMYLIN.COM> |
| Subject: | Re: Logic help |
|
| Content-Type: | text/plain; charset=ISO-8859-1 |
You are very close:
data want;
set have (where=(var2=0)) end=last;
if last then output;
run;
On Wed, 30 Apr 2008 19:15:23 -0400, DP <adsingh78@GMAIL.COM> wrote:
>Hi,
>
>How to get the maximum event time (MAXEVETM) that should be the last value
>of VAR1 where VAR2=0.
>
>Have:
>VAR1 VAR2
>8 0
>8 0
>8 1
>8 0
>8 1
>9 0
>9 0
>9 0
>9 1
>10 0
>11 1
>
>Want:
>
>VAR1 VAR2 MAXEVETM
>10 0 10
>
>Can it be done without sorting the data?
>
>I have this but not sure if correct…
>
>data want;
> set have end=last;
> if last and CENSOR=0 then output;
>run;
>
>Thanks a lot!
>
>DP
|