moving_average_seasonal: Moving average to smooth out seasonal time series

View source: R/timeseries.R

moving_average_seasonalR Documentation

Moving average to smooth out seasonal time series

Description

Moving average to smooth out seasonal time series

Usage

moving_average_seasonal(y, season, plotfig = TRUE)

Arguments

y

a vector with time series data

season

season = 12 for montly, season = 4 for quarterly etc

plotfig

if TRUE then a figure is plotted with data and moving average.

Value

a vector of the same length as y with moving averages (NA at boundaries)

Examples

M = moving_average_seasonal(c(AirPassengers), season = 12)

StatisticsSU/regkurs documentation built on Jan. 29, 2023, 4:54 p.m.