SUM Function


Returns the sum of the nonmissing arguments

Category: Descriptive Statistics

Syntax

SUM ( argument,argument , )

Arguments

argument

  • is numeric. If all the arguments have missing values, the result is a missing value. The argument list can consist of a variable list, which is preceded by OF.

Examples

SAS Statements

Results

x1=sum(4,9,3,8);

24

x2=sum(4,9,3,8,.);

24

x1=9;

x2=39;

x3=sum(of x1-x2);

48

x1=5; x2=6; x3=4; x4=9;

y1=34; y2=12; y3=74; y4=39;

result=sum(of x1-x4, of y1-y5);

183

x1=55;

x2=35;

x3=6;

x4=sum(of x1-x3, 5);

101

x1=7;

x2=7;

x5=sum(x1-x2);

y1=20;

y2=30;

x6=sum(of y:);

50




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net