Business Forecasting Using R
Business Forecasting Using R
Business Forecasting Using R
Module 5:
Introductory Time
Series Analysis using R
Agenda
4000
3500
3000
2500
2000
1500
5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
ay Apr Apr ar Feb -Jan -Jan Dec Nov Oct Oct Sep Aug -Jul -Jul Jun ay ay Apr ar Feb -Jan -Jan Dec Nov Nov Oct Sep Aug Aug -Jul Jun Jun
-M 7- 1- 1-M 8- 27 5 2- 1- 29- 1- 0- 9- 25 4 13- 3-M 2-M 4- 4-M 0- 30 9 8- 7- 5- 14- 0- 9- 6- 16 25- 4-
19 2 1 1 1 2 1 1 2 1 2 1 2 2 2
– A simple class of linear filters are moving averages with equal weight
30000
25000
20000
83 83 83 84 8 4 84 85 85 8 5 86 86 86 87 87 8 7 88 8 8 88 89 89 8 9 90 90 9 0 91 9 1 91 92 92 9 2 93 93 9 3 94
n- y- p- n- y- p- n- y- p- n- y- p- n- y- p- n- y- p- n- y- p- n- y- p- n- y- p- n- y- p- n- y- p- n-
Ja Ma Se Ja Ma Se Ja Ma Se Ja Ma Se Ja Ma Se Ja Ma Se Ja Ma Se Ja Ma Se Ja Ma Se Ja Ma Se Ja Ma Se Ja
• Example
• Consider the sales and advertising example
• The predict() function for the next 5 periods would result
Feb Mar Apr May Jun
2015 14.054795 12.109590 10.164385 8.219180 6.273975
• Plotting the
decomposed time
series
– Example of ad series
Microsoft Excel
97-2003 Worksheet
• Plot the quarterly saving rate
• Calculate it’s mean and median
• Plot the 3 quarter’s moving average along with the actual time
series
• What is the value of alpha? Does the series has any seasonality?
• Predict the next 5 month’s savings rate.
&