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 (October 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 12 Oct 2001 13:50:50 -0700
Reply-To:     Cassell.David@EPAMAIL.EPA.GOV
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "David L. Cassell" <Cassell.David@EPAMAIL.EPA.GOV>
Subject:      Re: PROC UNIVARIATE
Content-type: text/plain; charset=us-ascii

Rich wrote [in part]: > I need to find the maximum value of a variable within a certain class > of another variable. . . . . . > > The code works but I keep getting the following WARNING message in the > LOG file. As a result I need to clean the LOG window from time to time > in order to keep the program running. > > WARNING: The range of variable TERMTIME is too small relative to its > mean, numerical inaccuracies may occur. Recode if possible.

Well, it's hard to give you an optimal plan when you haven't said why you're doing this. But if you are doing it so often that you are filling up your log window, then you're probably not doing the best approach.

If you need multiple maxima of TERMTIME by PHASE, then perhaps you should: [1] not use PROC UNIVARIATE at all, but something a little faster like PROC SUMMARY; [2] do all the maxima at once, using a BY PHASE; statement in the PROC and save all the results in a new dataset; [3] then you can access the outputted dataset as needed, perhaps merging it with your original dataset to get all maxima at once, or using the dataset of maxima as a table lookup.

And finally, you really ought to think about why your values are so close to identical within each value of PHASE. Are they supposed to be that way? If so, then is there any point in pulling out the max within a value of PHASE if they all look to be about the same value?

HTH, David -- David Cassell, CSC Cassell.David@epa.gov Senior computing specialist mathematical statistician


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