-
-
Save finbarrtimbers/9318155 to your computer and use it in GitHub Desktop.
Ever wanted to plot the autocorrelation function of an ARIMA time series in R? Here's an easy way to do it.
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
# Creates a MA(3) model | |
ma.parameters <- c(0.5, 0.5, 0.2) | |
ma.model <- arima.sim(model=list(ma.parameters,n=100) | |
# Plots the autocorrelation function of the MA(3) model | |
acf(ma.model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment