moveav function

moveav smoothes a time series by moving averages

moveav smoothes a time series by moving averages

moveav(y, q)

Arguments

  • y: the series, a vector or a time series
  • q: scalar, span of moving average

Returns

g vector, smooth component

Examples

data(GDP) g <- moveav(GDP,12) plot(GDP) ; lines(g,col="red")
  • Maintainer: Rainer Schlittgen
  • License: GPL
  • Last published: 2021-10-30

Useful links