Command Reference
:
Function Reference
:
Function Reference: M
@movsumsq
Rolling (Moving) Statistics
Trailing moving
sums of squares (propagate NAs).
n
-period trailing moving sums of squares, propagating NAs.
Syntax:
@movsumsq
(
x, n
)
x
: series
n
integer, series
Return: series
For each observation
and integer
, compute the sums of squares () 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 @movsumsq(x, 12)
produces a linked series of the moving sum of squares of the series
x
where NAs are propagated.
Cross-references
See also
@movsum
.
For the NA-ignoring variant of this function, see
@msumsq
.