library(fpp3)
── Attaching packages ──────────────────────────────────────────────── fpp3 0.3 ──
✓ lubridate 1.7.9.2 ✓ feasts 0.1.6
✓ tsibble 0.9.3 ✓ fable 0.2.1
✓ tsibbledata 0.2.0
── Conflicts ─────────────────────────────────────────────────── fpp3_conflicts ──
x lubridate::date() masks base::date()
x dplyr::filter() masks stats::filter()
x tsibble::interval() masks lubridate::interval()
x dplyr::lag() masks stats::lag()
Random normal with mean 0 and variance 1.
yt = wn + phi * lag(wn)
phi1 <- -0.9
phi2 <- 0.9
y_ma <- y %>% mutate(wn_lag = lag(wn),
yt_ma1 = wn + phi1*wn_lag,
yt_ma2 = wn + phi2*wn_lag)
y_ma
y_ma %>% autoplot(wn)
y_ma %>% autoplot(yt_ma1)
y_ma %>% autoplot(yt_ma2)
y_ma %>% ACF(wn) %>% autoplot()
y_ma %>% ACF(yt_ma1) %>% autoplot()
y_ma %>% ACF(yt_ma2) %>% autoplot()