RMS Function

Returns the root mean square of the nonmissing arguments.

Categories:Descriptive Statistics
CAS

Syntax

RMS(argument <, argument, ...>)

Required Argument

argument

is a numeric constant, variable, or expression.

TipThe argument list can consist of a variable list, which is preceded by OF.

Details

The root mean square is the square root of the arithmetic mean of the squares of the values. If all the arguments are missing values, then the result is a missing value. Otherwise, the result is the root mean square of the nonmissing values.
Let n be the number of arguments with nonmissing values, and let x 1 comma x 2 comma ellipsis comma x Subscript n Baseline be the values of those arguments. The root mean square is

Example

The following SAS statements produce these results:
SAS Statement
Result
x1=rms(1, 7);
5
x2=rms(., 1, 5, 11);
7
x3=rms(of x1-x2);
6.0827625303
Last updated: March 16, 2017