Skip to content

Instantly share code, notes, and snippets.

@Harshit1694
Created July 9, 2019 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Harshit1694/f8cfd3565c3c29bfbc2e86d711e3c409 to your computer and use it in GitHub Desktop.
Save Harshit1694/f8cfd3565c3c29bfbc2e86d711e3c409 to your computer and use it in GitHub Desktop.
#Testing the stationarity of the data
#Augmented Dickey-Fuller Test
adf.test(tsdata)
#Autocorrelation test
autoplot(acf(tsdata,plot=FALSE))+ labs(title="Correlogram of Air Passengers data")
tsdata_decom$random
autoplot(acf(tsdata_decom$random[7:138],plot=FALSE))+ labs(title="Correlogram of Air Passengers Random Component")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment