Date: Mon, 17 May 2004 14:00:35 -0700
Reply-To: pete <twiddler81@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: pete <twiddler81@HOTMAIL.COM>
Organization: http://groups.google.com
Subject: Re: An easy one for you
Content-Type: text/plain; charset=ISO-8859-1
Ed,
I am looking into it, and the aim would be to retrieve all records
that are tied in 1000th place, even if this means outputting 1100
records. Can this be done?
cheers, richard
>From: Ed Heaton <EdHeaton@westat.com>
>To: 'pete' <twiddler81@HOTMAIL.COM>
>Subject: RE: An easy one for you
>Date: Mon, 17 May 2004 08:38:01 -0400
>
>Richard,
>
>What do you want to happen if the 1000th record is tied with, e.g.,
the
>1001th?
>
>Ed
"Lou" <lpogodajr292185@comcast.net> wrote in message news:<2uOdnQ1Xt_358DjdRVn-gQ@comcast.com>...
> "Bruce Johnson" <bjohnson@SOLUCIENT.COM> wrote in message
> news:B1EA9C6C7151EB42B242A4EFA0D0A71E019F6A8B@aaexchange01.HEALTH.AD...
> > If you've sorted it, the easy, non-confrontational way to do it is:
> >
> > Data top;
> > set fulldata;
> > by descending var;
> > if _n_ < 10001;
> > Run;
> >
> > If you are truly concerned about a tie, then look into Proc Rank...
>
> If you're going to output the first 1,000 observations, then you don't need
> the BY statement.
>
> >
> > ________________________________
> > Bruce A. Johnson
> > bjohnson@solucient.com
> >
> >
> > -----Original Message-----
> > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> > pete
> > Sent: Friday, May 14, 2004 6:22 AM
> > To: SAS-L@LISTSERV.UGA.EDU
> > Subject: An easy one for you
> >
> >
> > All sas dudes,
> >
> > I have a dataset with over 1 million records of which i need to output
> > the top 1000 based on a numerical 'by' variable. After it has been
> > sorted in decending order on the 'by' variable (which i can do) how
> > would I go about outputting the top 1000 records?
> >
> > Also what would happen if there was a tie for the 1000th place?
> >
> > Cheers for the help, Richard
> > This message is a private communication. It may contain information that
> is confidential
> > and legally protected from disclosure. If you are not an intended
> recipient, please do
> > not read, copy or use this message or any attachments, and do not disclose
> them to others.
> > Please notify the sender of the delivery error by replying to this
> message, and then
> > delete it and any attachments from your system.
> > Thank you,
> > Solucient LLC
> > (rev eXclaimer 2x)
|