ts_fil_ma {tspredit} | R Documentation |
Time Series Moving Average
Description
Used to smooth out fluctuations and reduce noise in a time series.
Usage
ts_fil_ma(ma = 3)
Arguments
ma |
moving average size |
Value
a ts_fil_ma
object.
Examples
# time series with noise
library(daltoolbox)
data(sin_data)
sin_data$y[9] <- 2*sin_data$y[9]
# filter
filter <- ts_fil_ma(3)
filter <- fit(filter, sin_data$y)
y <- transform(filter, sin_data$y)
# plot
plot_ts_pred(y=sin_data$y, yadj=y)
[Package tspredit version 1.0.777 Index]