Created
August 28, 2019 11:44
-
-
Save mvervuurt/3d2a65b609b58a8b1a41c0c0d1411012 to your computer and use it in GitHub Desktop.
Python statsmodels autocovariance, autocorrelation and partial autocorrelation
This file contains 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
# Remember that there are slightly different formulas for weakly stationary and strictly stationary time series | |
from statsmodels.tsa.stattools import acovf,acf,pacf,pacf_yw,pacf_ols | |
from statsmodels.graphics.tsaplots import plot_acf,plot_pacf | |
# Lag plots | |
from pandas.plotting import lag_plot | |
lag_plot(df1['Thousands of Passengers']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment