movingaveWgt

Purpose

Computes weighted moving average of a series

Format

y = movingaveWgt(x, d, w)
Parameters:
  • x (NxK matrix) – data
  • d (scalar) – order of moving average.
  • w (dx1 vector) – weights.
Returns:

y (NxK matrix) – filtered series. The first \(d-1\) rows of x are set to missing values.

Remarks

movingaveWgt() is essentially a smoothing time series filter with weights. The moving average as performed by column and thus it treats the NxK matrix as K time series of length N.

See also

Functions movingave(), movingaveExpwgt()