Skip to content

Instantly share code, notes, and snippets.

@Harshit1694
Created July 9, 2019 12:25
Show Gist options
  • Save Harshit1694/8e32d9cbfc7337e9650588e6d289539b to your computer and use it in GitHub Desktop.
Save Harshit1694/8e32d9cbfc7337e9650588e6d289539b to your computer and use it in GitHub Desktop.
#Fitting the model
#Linear model
autoplot(tsdata) + geom_smooth(method="lm")+ labs(x ="Date", y = "Passenger numbers (1000's)", title="Air Passengers data")
#ARIMA Model
arimats <- auto.arima(tsdata)
arimats
ggtsdiag(arimats)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment