Created
August 4, 2016 00:26
-
-
Save robjhyndman/3b341c50bf8adc10593ee82137eaab56 to your computer and use it in GitHub Desktop.
Use of Fourier series in simulating from an ARIMA model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(forecast) | |
fit <- auto.arima(USAccDeaths, xreg=fourier(USAccDeaths, 4)) | |
fc <- forecast(fit, xreg=fourier(USAccDeaths, 4, 12)) | |
plot(fc) | |
for(i in 1:12) | |
lines(simulate(fit, xreg=fourier(USAccDeaths, 4, 12))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment