MEDIAN Function


Computes median values

Category: Descriptive Statistics

Syntax

MEDIAN ( value1 <, value2, >)

Arguments

value

  • is numeric.

Details

The MEDIAN function returns the median of the nonmissing values. If all arguments have missing values, the result is a missing value.

Note: The formula that is used in the MEDIAN function is the same as the formula that is used in PROC UNIVARIATE. For more information, see 'SAS Elementary Statistics Procedures' in Base SAS Procedures Guide .

Comparisons

The MEDIAN function returns the median of nonmissing values, whereas the MEAN function returns the arithmetic mean (average).

Examples

SAS Statements

Results

x=median(2,4,1,3);

2.5

y=median(5,8,0,3,4);

4

See Also

Function:

  • 'MEAN Function' on page 644




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