Previous Page | Next Page

Functions and CALL Routines

EUCLID Function



Returns the Euclidean norm of the non-missing arguments.
Category: Descriptive Statistics

Syntax
Arguments
Details
Examples
Example 1: Calculating the Euclidean Norm of Non-missing Arguments
Example 2: Calculating the Euclidean Norm When You Use a Variable List
See Also

Syntax

EUCLID(value-1 <,value-2 ...>)


Arguments

value

specifies a numeric constant, variable, or expression.


Details

If all arguments have missing values, then the result is a missing value. Otherwise, the result is the Euclidean norm of the non-missing values.

In the following example, [equation] are the values of the non-missing arguments.

[equation]


Examples


Example 1: Calculating the Euclidean Norm of Non-missing Arguments

The following example returns the Euclidean norm of the non-missing arguments.

data _null_;
   x=euclid(.,3,0,.q,-4);
   put x=;
run;

SAS writes the following output to the log:

x=5


Example 2: Calculating the Euclidean Norm When You Use a Variable List

The following example uses a variable list to calculate the Euclidean norm.

data _null_;
   x1 = 1;
   x2 = 3;
   x3 = 4;
   x4 = 3;
   x5 = 1;
   x = euclid(of x1-x5);
   put x=;
run;

SAS writes the following output to the log:

x=6


See Also

Functions:

RMS Function

LPNORM Function

Previous Page | Next Page | Top of Page