Command Reference
:
Function Reference
:
Function Reference: M
@movmedian
Rolling (Moving) Statistics
Trailing moving median
(propagate NAs)
.
n
-period trailing moving median, ignoring NAs
.
Syntax:
@movmedian
(
x, n)
x
: series
n
integer, series
Return: series
For each observation
and integer
, compute the median using the current and previous
observations of the series,
propagating missing values (NAs).
If
n
is not an integer, the integer floor
will be used.
Examples
show @movmedian(x, 12)
produces a linked series of the moving median of the series X where NAs are propagated.
Cross-references
For the NA-excluding variant of this function, see
@mmedian
.