Page 33 - SAS_manual
P. 33
Purpose: Syntax
N(n1,n2,n3,….,n);
N count no. of non-missing value
Nmiss(n1,n2,n3,….,n);
NMISS count no. of missing value
largest(k,n1,n2,n3,….,n);
LARGEST Returns nth largest value
smallest(k,n1,n2,n3,….,n);
SMALLEST Returns nth smallest value
**k is used in largest and smallest function which indicates the k value that we want.
th
Program 4.2: Output:
As you observe the result window you can notice by using N function we can count the number of non-
missing value and by use NMISS we can count the number of missing value. Then come to LARGEST
function when we use K=1, then we got the 1 largest value .if we use k=2 then we get the 2 largest
nd
st
value. SMALLEST function also works on same concept as LARGEST.
Purpose: Syntax
INT Returns the integer part of given value int(argument)
Returns the next nearest highest integer
CEIL ceil(argument)
of given value
Returns the next nearest lowest integer
FLOOR floor(argument)
of given value
Returns the next nearest integer of
ROUND ROUND(argument, round-off-unit)
given value
SAS HANDBOOK | VISIT:: http://nikhilanalytics.com 33