This assignment required knowledge on time series and the application of them within R to forecast. The first step I decided to take was to code a data frame containing the information provided in the assignment details:
This was identical to the table provided, however gave me a hard time when applying the forecasting model since the separate data series were not sequential according to the plots; the "plot" function provided two separate plots to illustrate the data rather than a single, chronological one:This allowed me to use the plot function to produce a more articulate and useful plot for me to glean information from:
This provides a better understanding of the model of the charge behaviors over the course of 2 years, or 24 months as demonstrated by the plot. I decided to apply the same methods as the link, the HoltWinters() function to understand the plot and its characteristics.
In these circumstances, the alpha value is closer to 1, implying that the data is weighing the more recent points with more significance in an effort to forecast. Additionally, the coefficient is calculated. When applying the new forecasting data, the line that appears is shown as thus:
From this, we can observe that the forecast expected in comparison to the actual data is quite similar. Unlike the example provided, the smoothing line is not very different from the experimental line. This could be due to qualities of the data sample, such a n, variance, etc., however it still fulfills its job of presenting a more compact iteration of the data.
No comments:
Post a Comment