of the Month
Later this month a series of articles that I have written on Using SAS for Basic Statistics will start appearing on this web site. The first article will deal with Measures of Location and Variance, and how SAS calculates these statistics.
Now for this months' tip. In SAS/SQL it is possible to use the CALCULATED keyword to use values calculated elsewhere in the SQL statment. This prevents the need to recalculate values. The following example avoids having to recalculate the BSAVAL variable for use in the WHERE clause to select patients that have a BSA value of greater than or equal to 2.0:
PROC SQL; SELECT patid, height, weight, SQRT((height*weight)/3600) AS bsaval FROM vtialdat WHERE CALCULATED bsaval >= 2.0; QUIT; RUN;
Updated March 12, 2006