Command Reference
:
Function Reference
:
Function Reference: M
@movmax
Rolling (Moving) Statistics
Trailing moving maximums (propagate NAs).
n
-period trailing maximums
, propagating NAs.
Syntax:
@movmax
(
x, n)
x
: series
n
integer, series
Return: series
For each observation
and integer
, compute the maximum () using the current and previous
observations of the series,
and propagating missing values (NAs).
If
n
is not an integer, the integer floor
will be used.
Examples
show @movmax(x, 12)
produces a linked series of maximums based on a 12-period moving window over the series
x
where NAs propagate.
Cross-references
See also
@movmin
.
For the NA-excluding variant of this function, see
@mmax
.