Created
August 9, 2020 17:56
-
-
Save pkgandhi/494df5ba13c5c506d92e33e50e05d5d8 to your computer and use it in GitHub Desktop.
Using PP test to check stationarity
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
# Loading the packages | |
import pandas as pd | |
import pmdarima | |
# Loading the dataset: | |
data = pd.read_csv('../AirPassengers.csv') | |
data = data.rename(columns = {'#Passengers':'Passengers'}) | |
data = data.set_index('Month') | |
# Conducting PP test: | |
test = pmdarima.arima.PPTest() # You can choose alpha here, default = 0.05 | |
test.should_diff(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment