Load the AirPassengers data. Check its class and see the start and end of the series.
Check the cycle of the Time-Series AirPassengers.
Create a lag-plot using the gglag-plot from the forecast package. Check how the relationship changes as the lag increases.
Also, plot the correlation for each of the lags. You can see when the lag is above 6, the correlation drops, climbs up in 12 and again drops in 18.
Plot the histogram of the AirPassengers using a gghistogram from the forecast.
Use tsdisplay to plot auto-correlation, time-series and partial auto-correlation together in the same plot.
Find the outliers in the time-series.
- Become a Top R Programmer Fast with our Individual Coaching Program
- Explore all our (>4000) R exercises
- Find an R course using our R Course Finder directory
- Subscribe to receive weekly updates and bonus sets by email
- Share with your friends and colleagues using the buttons below