In the exercises below, we will explore more in the Time Series analysis. The previous exercise can be foundĀ here. Please follow this in sequence.

Answers to these exercises are available here.

**Exercise 1**

Load the AirPassengers data. Check its class and see the start and end of the series.

**Exercise 2**

Check the cycle of the Time-Series AirPassengers.

**Exercise 3**

Create a lag-plot using the gglag-plot from the forecast package. Check how the relationship changes as the lag increases.

**Exercise 4**

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.

**Exercise 5**

Plot the histogram of the AirPassengers using a gghistogram from the forecast.

**Exercise 6**

Use tsdisplay to plot auto-correlation, time-series and partial auto-correlation together in the same plot.

**Exercise 7**

Find the outliers in the time-series.

]]>- Spatial Data Analysis: Introduction to Raster Processing (Part 1)
- Spatial Data Analysis: Introduction to Raster Processing: Part-3
- Advanced Techniques With Raster Data: Part 1 – Unsupervised Classification
- 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

In the exercises below, we will work with Time Series analysis and see how R can make your life easier when working with Time Series.

This will be a series of Exercises and I urge you to take it in series.

Please install the package and load the library before starting.

Answers to these exercises are available here.

**Exercise 1**

Install the Forecast package. The first step in any analysis is to see the data and use the auto-plot to plot the gold data-set available in the forecast package.

**Exercise 2**

Find the outlier in the gold data. Find how far it is from the median.

**Exercise 3**

Use ggseasonalplot to plot the gas data. See how each year stacks with each other.

**Exercise 4**

Now I want to plot the gas data for the year 1990 and after. How do I achieve that?

**Exercise 5**

ggseasonalplot can be used to see seasonal plots as polar coordinates. Plot the same data as above, but use

polar coordinates instead.

**Exercise 6**

How can I see a monthly time series of the gas price?

Hint: use monthplot or ggsubseriesplot.

**Exercise 7**

For a time series, we can find the dominant frequency of that time series and use it for our analysis on how to

find the frequency of gas data (assume that it is a long /big data and you don’t have a clue about the frequency.)

]]>