moveav: 'moveav' smoothes a time series by moving averages

Description Usage Arguments Value Examples

View source: R/decomp.r

Description

moveav smoothes a time series by moving averages

Usage

1
moveav(y, q)

Arguments

y

the series, a vector or a time series

q

scalar, span of moving average

Value

g vector, smooth component

Examples

1
2
3
data(GDP)
g <- moveav(GDP,12) 
 plot(GDP) ; lines(g,col="red")  

tsapp documentation built on Oct. 30, 2021, 5:08 p.m.

Related to moveav in tsapp...