Page 32 - SAS_manual
P. 32
4 Functions
SAS has a wide variety of in built functions which help in analyzing and processing the data.
These functions are used as part of the DATA statements. They take the data variables as arguments
and return the result which is stored into another variable.
4.1 Numeric function
Purpose: Syntax
Sum Used to find out summation sum(n1,n2,n3….,nn);
Max Used to find out maximum value max(n1,n2,n3….,nn);
Min Used to find out minimum value min(n1,n2,n3….,nn);
Mean Used to find out average avg(n1,n2,n3….,nn);
Program 4.1: Out put
By observing the output window you may have a doubt that why total and avg_1 variable has missing
value.so that is the advantage of sum and mean function that it also take the missing value which is the
disadvantage of using an operator.
SAS HANDBOOK | VISIT:: http://nikhilanalytics.com 32