Command Reference : Function Reference : Function Reference: M
  
 
@mstdev
Trailing moving sample standard deviation (d.f. adjusted; ignore NAs).
n-period trailing moving square roots of Pearson product moment sample variances, with d.f. correction, ignoring NAs.
Syntax: @mstdev(x, n)
x: series
n integer, series
Return: series
For each observation and integer , compute the sample standard deviation (division by ) using the current and previous observations of the series,
and ignoring missing values (NAs).
If n is not an integer, the integer floor will be used.
Examples
show @mstdev(x, 12)
produces a linked series of the moving sample standard deviation of the series x where NAs are ignored.
Cross-references
See also @mstdevp, @mstdevs, @mvar, @mvarp, and @mvars.
For the NA-propagating variant of this function, see @movstdev.