help mata mz_stdc()
-------------------------------------------------------------------------------

Title

mz_stdc() -- Calculates the standard deviation of each column of a matrix

Syntax

real matrix mz_stdc(x)

where

x: real matrix

Description

mz_stdc() computes the standard deviation of each column of a matrix and puts the result in a column vector.

Remarks

Example:

: x 1 2 3 4 +-----------------+ 1 | 1 3 5 6 | 2 | 4 3 2 1 | 3 | 7 5 3 2 | 4 | 8 9 0 1 | 5 | 4 6 8 9 | 6 | 3 2 6 7 | 7 | 1 4 5 7 | 8 | 7 2 4 6 | 9 | 1 4 0 3 | 10| 1 4 6 7 | +-----------------+

: mz_stdc(x) 1 +---------------+ 1 | 2.790858092 | 2 | 2.097617696 | 3 | 2.643650675 | 4 | 2.884826203 | +---------------+

Conformability

mz_stdc(x) x: r x c result: c x 1.

Diagnostics

mz_stdc() returns an empty column vector if x is a row vector. In addition, to compute the standard deviations, mz_stdc() uses N-1 rather than N as divisor, where N is the number of rows of matrix x. To convert to the alternate definition, multiply the output of mz_stdc() by sqrt((N-1)/N).

Source code

mz_stdc.mata

Author

Diallo Ibrahima Amadou, zavren@gmail.com

Also see

Online: help for [M-5] variance(), ltimbimata