Discussion #4

Hello All,

For this discussion, I am using monthly Australian wine sales in thousands of liters. For this data set, I will only be looking at red wines. The data can be found by using the link below. The data begins in January of 1980 and ends in July of 1995.

https://datamarket.com/data/set/22q2/monthly-australian-wine-sales-thousands-of-litres-by-wine-makers-in-bottles-1-litre#!ds=22q2!2ekt=b&display=line.

The below imports the data and establishes the training and test data.

library(fma)
library(forecast)

# Import Data
dat <- read.csv("C:/Users/Jharrop/Desktop/ADEC7460 Forecasting/Discussions/Discussion 4/monthly-australian-wine-sales-th.csv")
datats <- ts(dat$Sales, frequency = 12, start = c(1980,1))

# Training & Test Sets
train <- dat[1:181,]
test <- dat[182:187,]

train <- ts(train$Sales, frequency = 12, start = c(1980,1))
test <- ts(test$Sales, frequency = 12, start = c(1995,2))

plot(datats)

Below fits the models. I only fit the models on the training set.

fit1 <- forecast(train); summary(fit1)
## 
## Forecast method: ETS(M,A,M)
## 
## Model Information:
## ETS(M,A,M) 
## 
## Call:
##  ets(y = object, lambda = lambda, allow.multiplicative.trend = allow.multiplicative.trend) 
## 
##   Smoothing parameters:
##     alpha = 0.1055 
##     beta  = 1e-04 
##     gamma = 1e-04 
## 
##   Initial states:
##     l = 932.0324 
##     b = 7.2125 
##     s=1.1259 1.0334 0.9391 1.0706 1.3257 1.3487
##            1.0998 1.0509 0.9355 0.845 0.7038 0.5217
## 
##   sigma:  0.1062
## 
##      AIC     AICc      BIC 
## 2813.207 2816.962 2867.581 
## 
## Error measures:
##                    ME     RMSE      MAE        MPE     MAPE      MASE
## Training set 4.959713 183.5849 137.5681 -0.7191406 8.454989 0.6690938
##                     ACF1
## Training set -0.01241072
## 
## Forecasts:
##          Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
## Feb 1995       1685.437 1455.943 1914.931 1334.456 2036.418
## Mar 1995       2029.638 1751.732 2307.544 1604.618 2454.659
## Apr 1995       2253.901 1943.590 2564.212 1779.321 2728.481
## May 1995       2539.755 2188.192 2891.317 2002.086 3077.423
## Jun 1995       2666.042 2295.027 3037.057 2098.624 3233.460
## Jul 1995       3279.249 2820.496 3738.002 2577.647 3980.851
## Aug 1995       3233.201 2778.543 3687.860 2537.861 3928.541
## Sep 1995       2618.821 2248.674 2988.968 2052.730 3184.912
## Oct 1995       2304.111 1976.802 2631.419 1803.536 2804.686
## Nov 1995       2543.088 2180.034 2906.141 1987.845 3098.330
## Dec 1995       2778.853 2380.195 3177.512 2169.158 3388.549
## Jan 1996       1291.415 1105.250 1477.581 1006.700 1576.131
## Feb 1996       1747.504 1494.385 2000.624 1360.392 2134.617
## Mar 1996       2104.152 1797.937 2410.368 1635.836 2572.468
## Apr 1996       2336.396 1994.800 2677.992 1813.970 2858.822
## May 1996       2632.429 2245.783 3019.076 2041.105 3223.754
## Jun 1996       2763.030 2355.361 3170.700 2139.554 3386.507
## Jul 1996       3398.185 2894.556 3901.813 2627.951 4168.418
## Aug 1996       3350.113 2851.413 3848.814 2587.417 4112.810
## Sep 1996       2713.232 2307.574 3118.891 2092.831 3333.634
## Oct 1996       2386.928 2028.515 2745.341 1838.782 2935.074
## Nov 1996       2634.221 2236.988 3031.455 2026.706 3241.737
## Dec 1996       2878.139 2442.295 3313.984 2211.572 3544.706
## Jan 1997       1337.419 1134.047 1540.792 1026.388 1648.451
fit2 <- auto.arima(train, seasonal = TRUE); summary(fit2)
## Series: train 
## ARIMA(1,0,1)(0,1,1)[12] with drift 
## 
## Coefficients:
##          ar1      ma1     sma1   drift
##       0.9299  -0.8337  -0.6276  8.3329
## s.e.  0.0533   0.0718   0.0620  1.2579
## 
## sigma^2 estimated as 43385:  log likelihood=-1142.93
## AIC=2295.86   AICc=2296.23   BIC=2311.51
## 
## Training set error measures:
##                      ME     RMSE      MAE       MPE     MAPE      MASE
## Training set -0.9675167 198.8707 144.5261 -2.082683 9.039178 0.7029356
##                      ACF1
## Training set -0.001142229
plot(fit1)

plot(fit2)

Below is the forecast for each model. (6 Months)

fcst1 <- forecast(fit1, h=6)
fcst2 <- forecast(fit2, h=6)

Plot and report accuracy results. (The plot window only show the test set)

plot(test, type="o", ylab="Red Wine Sales",
  flwd=1, plot.conf=FALSE)
lines(window(test, start = c(1995,2)),type="o")
lines(fcst1$mean,col=2)
lines(fcst2$mean,col=3)
legend("topleft", lty=1, pch=1, col=1:3,
    c("Data","ETS","ARIMA"))

# Accuracy 
accuracy(fcst1, test)
##                      ME     RMSE      MAE        MPE      MAPE      MASE
## Training set   4.959713 183.5849 137.5681 -0.7191406  8.454989 0.6690938
## Test set     364.996302 438.1978 364.9963 12.1029134 12.102913 1.7752432
##                     ACF1 Theil's U
## Training set -0.01241072        NA
## Test set     -0.08676785 0.8040507
accuracy(fcst2, test)
##                       ME     RMSE      MAE       MPE     MAPE      MASE
## Training set  -0.9675167 198.8707 144.5261 -2.082683 9.039178 0.7029356
## Test set     290.9153690 373.5353 300.3310  9.131719 9.670064 1.4607287
##                      ACF1 Theil's U
## Training set -0.001142229        NA
## Test set      0.284917138 0.6430348

The ARIMA model seems to be be performing better than the ETS.

Best, Jordan