# 3.5.2.27 Rms

## Description

Rms function returns the root mean square of a vector.

The Rms value for a set of n values $\{x_1, \ x_2,..., \ x_n\}$ is given by:

$x_{\mathrm{rms}}=\sqrt{ \frac{ \sum_{i=1}^{n} x_i^2 }{n} }$

## Syntax

double rms(dataset vd)

## Parameters

vd

Input vector to calculate

## Return

Return the root mean square of a vector.

Note: Missing values in vd won't be counted.

## Example

//Calculate the root mean square of a vector.
yr = rms(col(A));