Command Reference
:
Function Reference
:
Function Reference: M
@movvarp
Rolling (Moving) Statistics
Trailing moving population
variances (non-d.f. adjusted; propagate NAs).
n
-period trailing moving Pearson product moment population variances, with no d.f. correction, propagating NAs.
Syntax:
@movvarp
(
x, n
)
x
: series
n
integer, series
Return: number
For each observation
and integer
, compute the population variance () 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.
Equivalent to @movvar.
Examples
show @movvarp(x, 12)
produces a linked series of the moving population variance of the series
x
where NAs are propagated.
Cross-references
See also
@movstdev
,
@movstdevp
,
@movstdevs
,
@movvar
, and
@movvars
.
For the NA-ignoring variant of this function, see
@mvarp
.