@movsum |

Trailing moving sums (propagate NAs).

n-period trailing moving sums, propagating NAs.

Syntax: @movsum(x, n)

x: series

n integer, series

Return: series

For each observation and integer , compute the sum () 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 @movsum(x, 12)

produces a linked series of the moving sum of the series x where NAs are propagated.

Cross-references

See also
@movsumsq.

For the NA-ignoring variant of this function, see
@msum.