ma: Moving-average smoothing

Description Usage Arguments Value Author(s) See Also Examples

Description

Computes a simple moving average smoother.

Usage

1
ma(x, order, centre=TRUE)

Arguments

x

Univariate time series

order

Order of moving average smoother

centre

If TRUE, then the moving average is centred.

Value

Numerical time series object containing the smoothed values.

Author(s)

Rob J Hyndman

See Also

ksmooth, decompose

Examples

1
2
3
plot(wineind)
sm <- ma(wineind,order=12)
lines(sm,col="red")

ttnsdcn/forecast-package documentation built on June 1, 2019, 2:49 a.m.