Module 12: Timely Time Series

 Hi everyone! 

This week we are looking into time series where we dive into the past to predicate the future! Our goals in using time series analysis include identifying patterns in the periodic data, predict short term trends, and model these findings. Time series data has components with the most common being the trend and seasonal components. In our data if we see a lot of fluctuation around a common line or "zone", we can focus on methods to understand the trend component like simple exponential smoothing. If more of the data fluctuates based on periodic fluctuations we use methods like decomposing and seasonally adjusting.

We will be focusing on exponential smoothing in our data today! This is useful for short term forecasting with an alpha coefficient between 0 to 1 indicating the weight of the moving average. A smaller alpha means the data is getting more smoothed while a higher alpha indicates less smoothing. 

Let's get started!

The table below represents charges for a student credit card.

Month20122013
Jan31.939.4
Feb2736.2
March31.340.5
Apr3144.6
May39.446.8
Jun40.744.7
Jul42.352.2
Aug49.554
Sep4548.8
Oct5055.8
Nov50.958.7
Dec58.563.4

a. Construct a time series plot using R.


















b. Employ Exponential Smoothing Model as outline in  Avril Voghlan 

Links to an external site.'s notes and report the statistical outcome.



Links to an external site.








c. Provide a discussion on time series and Exponential Smoothing Model result you found.

This analysis looks into monthly time series of student's credit card charges by setting the frequency at 12 and starting in 2012 to 2013. The plot of the time series shows a pretty clear upward trend with varying fluctuation and a large drop in the start of 2013. The data can be seen to be seasonal with lower credit charges in the beginning of the year and higher towards the end. However, the trend component is stronger thus we use a simple exponential smoothing method. The output of HoltWinters() tells us that the estimated value of the alpha parameter is about 0.8232. This is very close to one, telling us that the forecasts are less smoothened with lower irregular components. In the fitted forecast we can see the upward trend component values more clearly from 31 to 57. The Exponential smoothing plot shows the original time series in black, and the forecasts as a red line. The time series of forecasts is not much smoother than the time series of the original data here. It is simply shifted slightly lower and to the right on the graph which agrees with the 0.8232 weight coefficient. However, from this shift we can tell the increase in credit charges is more gradual than the steep increase we see from 2012.5 to 2013 in the original plot.

As a measure of the accuracy of the forecasts, we can calculate the sum of squared errors for the in-sample forecast errors, that is, the forecast errors for the time period covered by our original time series.
> Chargeforecast$SSE
[1] 835.3837

The sum of squared errors is 835.3837.

-Ramya's POV


Comments

Popular posts from this blog

Module 10: Varying Multivariate Regression

Final Project: Serially looking at your Cereal Choices